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

How I do make it so the ImageButtons go visible after someone pressed a Textbutton?

Asked by 6 years ago
Edited 6 years ago

The script is located in Lighting, inside a Screen GUI. What I’m trying to do is so when the Intro GUI loads, and the person presses ‘start’ the two Image Buttons appear.

01script.Parent.TextButton.MouseButton1Click:Connect(function()
02 
03script.Parent.Frame.Visible = false
04 
05script.Parent.Frame1.Visible = false
06 
07script.Parent.TextButton.Visible = false
08 
09script.Parent.TextLabel.Visible = false
10 
11script.Parent.TextLabel2.Visible = false
12 
13script.Parent.TextLabel3.Visible = false
14 
15script.Parent.Parent.Parent.StarterGui.EggMenu.a2018.Visible = true
16 
17script.Parent.Parent.Parent.StarterGui.EggMenu.a2019.Visible = true
18 
19end)

(it used to work until i put the screen gui into Lighting this is because the script to load the screen gui when someone joins required for it to be in lighting)

0
It's obvious that the GUI won't be seen by the player unless it is cloned into their PlayerGui. Why do you even have it in Lighting? Why not ReplicatedStorage? DeceptiveCaster 3761 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

Okay, first of all the fact that you have it in lighting is just wrong. You don’t put it in lighting. And like RobloxWhizYT said you should put it in ReplicatedStorage.
playergui = game.Players.LocalPlayer:WaitForChild(“PlayerGui”)
and then do something like
GUI = YourGui:Clone() Gui.Parent = playergui

Your script here.

Ad
Log in to vote
0
Answered by 6 years ago

Same with me

When I create Screen Guis, I either put them in PlayerGui or in Replicated storage. Putting Guis in lighting can cause a lot of problems. Please Upvote this to support me

Answer this question