I have the core scripts(Player Module), and I have checked pretty much all of the camera modules but couldn’t find where exactly the players rotation was being set. Maybe I can make it without the Core Scripts but i don’t know how, I tried alot of stuff, none worked.
if I know what you’re talking about, it should be in the location of the shiftlock script i’d think. but I don’t know much about this, I hope you can find an answer.
im 90% sure this is done with either a bodygyro or alignorientation. i could be wrong. however, if i wanted to make a system similar, i’d have a bodygyro or alignorientation in the player and make a custom rotation system and constantly set the CFrame of the mover to the direction of their movedirection. little known fact, if you disable the autorotate value in the character, they wont rotate in shiftlock, so you can control the shiftlock speed by changing the power or torque of your mover. when shift locked, rotate it to face the y axis of the camera
Well thats a way but I have figured it out from the core scripts, for anyone in the future that wants to do the same, here is how I did it:
First get the PlayerModule and PlayerScriptsLoader in your StarterPlayerScripts (You can get the scripts by playing, copying the module, and then pasting it in after playtesting.)
Go To: PlayerModule > CameraModule > BaseCamera and open the module.
Around line 610 there is a function that updates mouse behavior, such as locked, free etc.
In the function, it checks if the mouse is locked or not. I put a tween where the mouse is locked that makes the RootPart look at cameras direction and play it after disabling AutoRotate, and when it is not locked, I enable the AutoRotate and cancel the tween.