Not rotate the player (adding rotation) but actually setting the rotation to something (like setting it to 0, 0, 0 would make it completely unrotated). Here is the function I made which doesn't seem to be working too well.
function module.SetPlayerRotation(player, rotation)
player:SetPrimaryPartCFrame(CFrame.new(player.HumanoidRootPart.Position, Vector3.new(math.rad(rotation.x), math.rad(rotation.y), math.rad(rotation.z))));
end
EDIT: What I'm trying to do here is set the CFrame of HumanoidRootPart to a new CFrame equal to the current CFrame position, and a new given rotation. The function takes in an argument of a player to change the rotation of, and a rotation to set the player to.

1 comment
instead of "player" you should be doing "player.Character"