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