For a place i am making, which is in first person, i need to allow my mouse to move while the GUI is open
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local open = false
mouse.KeyDown:connect(function(key)
if key == "q" then --replace this with the key you want
if open == false then
open = true
script.Parent.ShopFrame.Visible = true
elseif open == true then
open = false
script.Parent.ShopFrame.Visible = false
end
end
end)
what would I have to add or change to allow this?

1 comment
forgot to say, the mouse needs to be able to move when the shop is open, but lock in the middle again when it closes