Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[GUI Help]The Code that worked in Studio won't work in Roblox Player. What do I do?

Asked by 6 years ago
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?

0
What script do you used? LocalScript or Script? HaveASip 494 — 6y
0
Is this a LocalScript? Enomphia 39 — 6y
0
A Script. ComLBY_Dev 21 — 6y

Answer this question