01 | local player = game.Players.LocalPlayer |
02 | local mouse = player:GetMouse() |
03 |
04 | local open = false |
05 |
06 | mouse.KeyDown:connect( function (key) |
07 | if key = = "q" then |
08 | if open = = false then |
09 | open = true |
10 | script.Parent.ShopFrame.Visible = true |
11 | elseif open = = true then |
12 | open = false |
13 | script.Parent.ShopFrame.Visible = false |
14 | end |
15 | end |
16 | 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
01 | local player = game.Players.LocalPlayer |
02 | local mouse = player:GetMouse() |
03 |
04 | local open = false |
05 |
06 | mouse.KeyDown:connect( function (key) --The open parenthesis before the "function" needs to be closed |
07 | if key = = "q" then |
08 | if open = = false then |
09 | open = true |
10 | script.Parent.ShopFrame.Visible = true |
11 | elseif open = = true then |
12 | open = false |
13 | script.Parent.ShopFrame.Visible = false |
14 | end |
15 | end |
16 | end ) --There was no parenthesis here |
Like my answer if you found it useful!