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

Shop GUI wont switch GUI's when I click on a gun section (Please answer :)?

Asked by
Vid_eo 126
9 years ago

I'm making a Shop GUI for an upcoming game, and I want it to have sections like guns. Pretty much when you click on a button it shows a gun section, and when you click on another it shows a character section. Here is the script:

OpenGuns = script.Parent:WaitForChild("Guns")
Gun1 = script.Parent:WaitForChild("Gun1")
ScrollingFrame = script.Parent.Parent.Parent.Parent:WaitForChild("ScrollingFrame")
Blue = Color3.new(27, 103, 202)
Characters = script.Parent.Parent:FindFirstChild("Characters") 
Grey = Color3.new(98, 98, 98)
Box = script.Parent.Parent:WaitForChild("Box")
Box2 = script.Parent.Parent.WaitForChild("Box2")
Box.Visible == true 



function OnClicked()
    if Box.Visible == true then
    Gun1.Visible = true
    Box.Visible = false
    Box2.Visible = true
    GunButton.BackroundColor3 = Blue
    Characters.BackroundColor3 = Grey
end

OpenGuns.MouseButton1Down:connect(OnClicked)

Here are the arrangment of things like ScreenGUI's and frames: -StarterGUI --ScreenGui ---LocalScript ---Box ----ScrollingFrame -----Stene - 85 credits -----Erica-105 credits ----Characters ----Guns -----LocalScript(The one I typed out) -----Gun1 ----Open/CloseShop Thx!

-club101coolguy


0
any output? yogipanda123 120 — 9y
0
no Vid_eo 126 — 9y

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago

The if statement on line 14 is not closed with an end.

0
Still doesn't work :/ Vid_eo 126 — 9y
Ad

Answer this question