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
You forgot the end parenthesis at the end on line 4
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local open = false mouse.KeyDown:connect(function(key) --The open parenthesis before the "function" needs to be closed 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) --There was no parenthesis here
Like my answer if you found it useful!