repeat wait() until game.Players.LocalPlayer.Character
game.Players.LocalPlayer.Character.Torso.Neck.MaxVelocity = 0.3
function turnheads()
while true do
wait()
if game.Players.LocalPlayer.Character then
if game.Workspace.CurrentCamera.CameraSubject == game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
camf = Vector3.new(game.Workspace.CurrentCamera.CoordinateFrame.X,game.Workspace.CurrentCamera.CoordinateFrame.Y,game.Workspace.CurrentCamera.CoordinateFrame.Z)
lv = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector
torsop = game.Players.LocalPlayer.Character.Head.Position
game.Players.LocalPlayer.Character.Torso.Neck.DesiredAngle = -(((torsop - camf).Unit):Cross(lv)).Y
end
end
end
end
turnheads()
COMMUNITY QUESTION
Whats wrong with this script?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Use code formatting, please, it's very hard to read like that. Click the circular Lua sign in the text editor and insert the code between the lines that it inserts.
Takes a lot of effort to read through that, or to run it ourselves, you could describe what is not working (such as the output) and make it more readable by replacing 'game.Players.LocalPlayer.Character' with a variable that references that object path.