Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I rotate the player without screwing up movement?

I've got a method that rotates the player, and it rotates the player just fine, but for some reason, it prevents the player from moving properly and causes extreme jittering when movement is attempted.

function module.RotatePlayer(player, rotation)
	local rotatedCFrame = player:GetPrimaryPartCFrame() * CFrame.Angles(math.rad(rotation.x), math.rad(rotation.y), math.rad(rotation.z));
    player:SetPrimaryPartCFrame(rotatedCFrame);
end 

1 answer

✓ Accepted answer

I believe the issue is that the server is setting the rotation for the client. If you were to put this into a local script it should fix the jittering issue.

2 comments

0

I thought client scripts were just for stuff that you wanted to happen to one player instead of all of them? Wouln't I want the player to rotate on everyone's screens?

0

It works, thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.