Is it possible to force a palyer out of shift lock?


I am trying to a radial menu with a mouse gui arrow in the middle to work as a selection indicator. I found explanation on how to do it here on devforum but it has one glaring issue that I can’t figure out how to fix.

As you will see in the video the gui rotates fine, however when you turn on shift lock it doesn’t work, and more to the point it kinda ruins the experience to have the camera and your character spin around when you use the menu.

So I want to force the player out of shift lock upon entering menu.However trying to research this I only found solutions that are now outdated due to core script updates. So now I am wondering if it is currently possible at all?

1 Like

This wont work its just a idea of what to do

local guiisopen = false

if script.Parent.Visible == true then

guiisopen = true


if guiisopen then

StarterPlayer = game:GetService("StarterPack")

game.StarterPlayer.EnableMouseLockOption = true


if not guiisopen then

game.StarterPlayer.EnableMouseLockOption = false


I don’t really understand what your saying but I think you want shift lock to be disabled when a gui is visible?

Put this local script inside your guis frame

Turn shiftlock as developer-set so the player can’t turn it on themselves. If you want them to be able to turn it on after the menu is gone, add a RemoteEvent to the GUI and fire it when the player closes it. Then once the RemoteEvent is fired, allow the player to enable shiftlock. I am not exactly sure how this is to be done, but yes it is possible. If you don’t know where to start, I’d recommend checking the player in game.Players. This is where the settings are most likely stored. Sorry I couldn’t be more help, but good luck!

1 Like

this is not what i meant. This turns off the value but doesn’t make the camera stop followign the mouse. I want to go from the mouse being locked in center while in shift lock to back how it is when it is off, with the cursor free and the camera not following the mouse.

So just switch false to true, and true to false.

i suggest you try it yourself to see why i say that doesn’t work

what codmiestero7 said would probaly work so try what he said

yes but the issue is that say they turn off the menu and i enable it. They then turn on shift lock and open the menu again. And now they are stuck like that

When they open the menu, call an event to turn it off.

like i said. If they have it on when you change the value it doesn’t change the camera. it still follows the mouse. this is why i asked if it is possible to force him out. not just turn off the value

No… no… Not exactly what I meant. In my first post, I recommended that you disable their ability to manually toggle it. Next you would need to make a script that turns it on when they press shift. Then, you make it so that when they are not in the menu, they are not able to turn it on, AND it automatically turns off. Finally, to make it so that they could turn it off completely if they would like, add a GUI to disable/enable it. Again, sorry about how much I can help. I’ve never really worked on stuff like this, and I know that there is probable a more simple way to do this, but good luck.

1 Like

Ah so basically you are suggesting i go the other way. I disable shift lock and make a custom one instead. Ye that makes sense

Yeah. I know its a bit more work, and I apologize that I don’t know another way to do it. On the bright side, It will make your game look like it took more effort, and probably in the end make it look nicer too.

Off-Topic Tip

A little off topic tip, if you end up doing my settings idea, you should use the settings GUI to your advantage. Players seem to appreciate games that will allow them to customize their preferences, such as the option to turn on dark mode, or the ability to mute the in-game music. If you want, I could write a script to help you with that GUI.

Nah I think I can figure this out. Thank you for your help