I've got this server script:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char.Torso.Changed:connect(function(look) print(char.Torso.CFrame.lookVector) end) end) end)
It's supposed to return the lookvector of the player's torso when it changes, however this doesn't work after the first few times for whatever reason.
EDIT: Tried using a repeat:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) wait() repeat print(char.Head.CFrame.lookVector) wait(0.1) until char.Head ~= nil end) end)
Only fires once now for some reason.
Physics won't fire the Changed
event consistently, so I would only expect to see this event fired when the player was somehow teleported.
Consider instead using a repeating loop, or just checking the lookVector whenever you require it (in whatever function / event / loop that is)