If you have an idea or tip please write it in the answers. It doesn't write that there is a problem with the script or at least I can't find it. As ever any help will be appreciated. Here is the script.
script.Parent.MouseButton1Down: connect (function() script.Parent.Parent.ShopFrame.Visible = not script.Parent.Parent.ShopFrame.Visible end)
First of all,
Please remove the spaces between MouseButton1Down:
and :connect
. Also remove the spaces between :connect
and (function()
.
Second of all,
:connect
is deprecated. Use :Connect
instead.
Third of all,
You should use false
instead of not
at line 2.
Fourth of all,
If this is a script, put it into a localscript. That is the most likely problem if you script works in ROBLOX studio but not in your game.
Just make this script as LocalScript And add at the start wait(0.1)