local Button = script.Parent.OpenGamepassShop -- Image Button (click to open shop)
Frame = script.Parent.Frame -- Where my Frame is
local Button2 = script.Parent.Frame.Close -- The [X] button(close button)

function onClick()
if Frame.Visible == false then
Frame.Visible = true
elseif Frame.Visible == true then
Frame.Visible = false
end
end


Button.MouseButton1Click:Connect(onClick)
Button2.MouseButton1Click:Connect(onClick)

The above code is what I have used in Studio to make Frames visible so that people can see. It worked perfectly in Roblox Studio, but I tried out in Roblox Player, and it won't work. I can click on it, but the Frame won't open. What is the error? Is it related with Experimental Mode?

3 comments

0

What script do you used? LocalScript or Script?

0

Is this a LocalScript?

0

A Script.