Clientside Code, Something wrong.

I got this clientside code that creates a healthbar and name tag behind your head:

It works great, but it only rotates for the client, and the others just stand still… hard to explain.


This is in Shared.lua
I cant see why only the client’s is rotating. heres the code
local BarP = v:GetPos()-v:GetAngles():Forward()*70
BarP = BarP:ToScreen()
draw.RoundedBox(0, BarP.x-75, BarP.y-20, 150, 20, Color( 20, 20, 20, 255 ))
draw.SimpleText( v:Nick(), “ChatFont”, BarP.x, BarP.y - 10, Color( 0, 255, 0, 255 ),1, 1)

draw.RoundedBox(3, BarP.x-75, BarP.y, 150, 20, Color(0,0,0,255))
draw.RoundedBox(3, BarP.x-75, BarP.y, v:Health()*1.5, 20, Color(col.r,col.g,col.b,255))
draw.RoundedBox(3, BarP.x-75, BarP.y, v:Health()*1.5, 8, Color(col2.r,col2.g,col2.b,255))
draw.SimpleText(v:Health(), “ChatFont”, BarP.x-75, BarP.y+3, Color(30, 30, 30, 255), 0, 0)
yes, I got

for _, v in ipairs(player.GetAll()) do  

and the “col”'s defined, I just dont see why that should be posted when its not causing it.


Btw, 100th post :3


Uploadig a video that will show it.


As you can see so is my healthbar rotating, not the bot’s. :C


Where is MakeR when you need him :confused: :stuck_out_tongue:

Here, but I don’t know what the problem is, Sorry.

The problem is that for the client (themselves only) the HP will rotate when their character rotates, but no one elses (other players) HP bar will not rotate around the character, but will stay locked to a certain position next to that person.

I know, what I meant is that I don’t know how to fix it.


Sorry if I was unclear.

Can you try it with other players? Maybe bots are somehow not affected?

I have already tried that with no luck. :smith:

Try :EyeAngles() instead of :GetAngles(), you never know it just might work v:v:v

Holy Jesus! It Worked! :holy:
Thanks! :biggrin: