How would I disable and reenable shiftlock through a script?

Hey! I’ve tried to make a script to enable and disable shiftlock (pc). I could get a zoom limit to work, but not the shiftlock.

image
image

Please help if possible :slight_smile:

1 Like

I made this script really quick.

game.Players.PlayerAdded:Connect(function(player)
	while true do
		player.DevEnableMouseLock = true
		wait(5)
		player.DevEnableMouseLock = false
		wait(5)
	end
end)

You can use player.DevEnableMouseLock to do it, but it only works from scripts, not from localscripts, so you have to do it on server side.

Thank you very much! This worked :slight_smile:

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