So I'm trying to make a third person game, and have the Player swivel around their mouse like how Third Person MMO's do it sometimes. Here's what I have, but it doesn't do what I want it to do, I kind've just spin there constantly Code:
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Character; repeat wait() Character = Player.Character until Character;
function UpdateRotation()
Character:SetPrimaryPartCFrame(Character.PrimaryPart.CFrame*CFrame.fromEulerAnglesXYZ(0, Mouse.X, 0))
end
while true do
UpdateRotation()
wait()
end

2 comments
Instead of character.PrimaryPart.CFrame use character:GetPrimaryPartCFrame()
Thank's, but that still doesn't change the fact that my guy is just spinning constantly