local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local open = false
mouse.KeyDown:connect(function(key)
if key == "q" then
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
I have tried to fix it but i cant find out what is wrong

6 comments
oh, Thanks!
is there any way that i could make the mouse able to move while it is open (My game is locked in first person)
I'm pretty sure you can just right click while your mouse is over the GUI, and it will unlock the mouse
If you're stuck in first person, and your mouse won't move, then press ESC
i cant move my mouse onto the GUI, it is at the side of the screen
but i can just move the gui to the middle