How to disable the character's movement and rotation

i want to make a script that when the player presses the L button his movement becomes locked

what i mean by locked is that he cant move nor rotate his character until he presses the L button again to unlock his movement

please specify if its a local or a server script, and where should i insert it

btw i use shiftlock thats why i dont want the character to rotate when the camera is moved
and thank you

thanks to whoever is trying to help but i found a solution here it is for who is curious

		character.Humanoid.AutoRotate = false -- this disables the player character rotation and only rotates the camera around the character
		
		character:WaitForChild("HumanoidRootPart").Anchored = true -- this disables the player movement
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.