Returning targeted players angle (Clientside)

Hey,
Just wondering if anyone can help with the current problem I am experiencing. I am trying to retrieve the roll of a target players angle to show which direction they are currently facing.

[lua]
local tr = {}
tr.start = self:GetPos()+Vector(0,0,40)
tr.endpos = target:GetPos()+Vector(0,0,40)
tr.filter = self
tr.mask = MASK_SHOT_HULL
tr = util.TraceLine(tr)
if tr.HitNonWorld then
if tr.Entity == target then
entangle = target:GetPos():Angle()
print(entangle)
end
end
[/lua]

I have also tried with tr.HitNormal but I find the angle data can be very inconsistent with the direction they are facing, I am open to suggestions but it has to be clientside. Thanks.

Why not

[lua]

target:GetAngles():Forward()

[/lua]

?

Why not



target:GetForward()


?

He wants an angle, that returns a vector IIRC

target:GetAngles():Forward() returns a vector too, smartass.

My bad then, no need to be calling names.

Target:GetAngles() will always return 0,0,0. As I believe it cant be done clientside.

I also tested:

[lua]
print(target:Nick())
[/lua]

To make sure it was actually getting a valid target, which it did.

target:EyeAngles()

You’re probably looking for the yaw.

That works exactly how I wanted. Much appreciated to everyone in the thread. Ill put the thread to solved.