How to replicate/customize shiftlock

hello, i am making a kart game, and i would like to make the player’s camera locked like the shiftlock. when i use the shiftlock, i can move backwards without my character turning around. is there a way i can have that, and also make the player unable to move their mouse?

Are you trying to force shiftlock or make your own camera system?

not sure how to explain it, do you know smashkarts.io? i am trying to replicate that

You should use UserInputService.MouseBehavior for your own shiftlock system, as the old shiftlock system is outdated and doesn’t allow for much customization.

is there a way to lock the player’s camera to the torso? i tried this and it didn’t work

local camera = Instance.new("Camera")
camera.CameraType = Enum.CameraType.Scriptable
camera.Parent = player.Character
camera.CFrame = player.Character.HumanoidRootPart.CFrame + Vector3.new(0, 10, 0)

MouseBehavior is simple, if you lock it on the center it will simply stay locked, won’t change the shoulder view or anything like shiftlock does. You should use CameraOffset for this, but you can test some things and see what suits best (I’m not on PC). Reminder: MouseBehavior > Shiftlock. Also, don’t create a new camera, but use workspace.CurrentCamera.