- What do you want to achieve?
I’m making a custom camera system, but I ran into a problem when trying to make the player character rotate with the camera (like what happens when you shift-lock).
- What is the issue?
The method i’m currently using is changing the rotationtype in a localscript
if strafeEnabled then
-- Character aligns with the Camera
UserSettings():GetService("UserGameSettings").RotationType = Enum.RotationType.CameraRelative
else
-- Character rotation is independent of the Camera
UserSettings():GetService("UserGameSettings").RotationType = Enum.RotationType.MovementRelative
end
This works perfectly, but only on the player’s first life. When the player resets, the rotation stops working.
If you look at the output, you’ll notice something strange. The RotationType does correctly change, but it has no actual effect on the character after respawning.
- What solutions have you tried so far?
I looked around the devforum and saw a couple topics about this issue (see below), however none of them arrived at a solution, and it’s unclear whether or not this is an engine bug.
The replicability of this “bug” leads me to believe that this isn’t caused by other scripts or systems in my game.
Any help would be greatly appreciated