What is the best way to rotate a player?
Hey
Trying to rotate a character
Here is the code I have so far which sucessfully rotates the player 45 degrees on the y axis
1 | game.Players.PlayerAdded:connect( function (ply) |
2 | game.Workspace:WaitForChild(ply.Name) |
3 | local character = game.Workspace [ ply.Name ] |
4 | character.Humanoid.AutoRotate = false |
6 | character.Torso.CFrame = CFrame.Angles( 0 ,math.rad( 45 ), 0 ) + character.Torso.CFrame.p |
However, when rotating 45 degrees on the x axis the character is always trying to rotate itself back to standing up
1 | game.Players.PlayerAdded:connect( function (ply) |
2 | game.Workspace:WaitForChild(ply.Name) |
3 | local character = game.Workspace [ ply.Name ] |
4 | character.Humanoid.AutoRotate = false |
6 | character.Torso.CFrame = CFrame.Angles(math.rad( 45 ), 0 , 0 ) + character.Torso.CFrame.p |
If there were some way to stop the character from trying to auto flip itself back to normal orientation then that would fix the problem. I have tried turning off autorotate but this only fixed the problem on the y axis. I have also tried using bodygyro, but you can't set a particular rotation with that so that is not ideal.
Any help will be greatly appreciated