How to force Shift Lock

Hi, so I’m trying to force shift lock for all the players. Everything that I have found online hasn’t worked. Does anyone know how to do this? Thanks!

I’m not too sure you can But I know you can change the camera to position over the shoulder instead of shiftlock

Happy Birthday btw

1 Like

Basically I just want the player to face the direction of the camera. Do you know how I could do this, I don’t need code or anything, just how I would go about implementing this.

I’ve only done so much with camera and camera positions so I’m not too sure how

1 Like

My best solution would be to use Model:SetPrimaryPartCFrame on the player’s character.
In localscript:

local plr = game.Players.LocalPlayer
local character = plr.Character


Of course, this is just a very basic method, but if you set it to the Character’s position and restrict turning on the X and Z axis, this will work.

also happy birthday :birthday:

1 Like

Brilliant, thank you so much it works!!!

local userInputService = game:GetService("UserInputService")
	if userInputService:IsKeyDown(Enum.KeyCode.LeftAlt) == true or userInputService:IsKeyDown(Enum.KeyCode.RightAlt) == true then
		userInputService.MouseBehavior = Enum.MouseBehavior.Default
		userInputService.MouseIconEnabled = true
		userInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
		userInputService.MouseIconEnabled = false

You could put this in a localscript in playergui or something, as well. It will work quite a bit differently than the other script - to suit your preference. Players can hold “alt” to move the mouse if they need to access a GUI or leave the game or something.

1 Like

I’ll check that out. I gtg, I’ll test it when I get back. Thanks everyone for all your help!