making a entity angle torwards someone.

I don’t know why i can’t figure this out right now but can someone tell me how to use SetAngles to point a ent torwards another

[lua]
local ent1pos, ent2pos
ent1pos = YourEntity:GetPos()
ent2pos = YourOtherEntity:GetPos()

YourEntity:SetAngles((ent2pos - ent1pos):Angles())
[/lua]

Something like that, iirc

it worked, geee thanks