The button is used to open and close a frame in a Gui. When I click on the button in Studio > Test, it works but, but when I click on the button in server mode, nothing happens...
open = false
function onClicked()
if open == false then
open = true
script.Parent:FindFirstChild("ClickSound"):Play()
script.Parent.Parent.ShopGUI.Visible = true
else
open = false
script.Parent:FindFirstChild("ClickSound"):Play()
script.Parent.Parent.ShopGUI.Visible = false
end
end
script.Parent.MouseButton1Down:connect(onClicked)
Can someone tell me what I'm doing wrong?

3 comments
What kinda script are you using and where is it located?
In using a normal script and its inside the text button
I'm*