Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you disable shift lock for gui's?

Asked by
bopqwe 4
6 years ago

I have shiftlock forced on the player when they join but I want to know how to disable it when they open a gui so their mouse isn't locked.

local mouse = game.Players.LocalPlayer:GetMouse()

mouse.KeyDown:connect(function(key)
    if key:lower() == "g" then
        script.Parent.Enabled = not script.Parent.Enabled
    end
end)
this.ShiftLock = true

1 answer

Log in to vote
0
Answered by
wookey12 174
6 years ago

change your camera type to "Scriptable" when they press g. then when they get out of the gui, change your camera type back to "Custom". all of these camera types are found in "Camera" in "Workspace".

Ad

Answer this question