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

How come this script wont work?

Asked by 8 years ago

So I am trying to make it so that my other GUI's don't mix with my IntroGUI. They're in the way and I want to make them invisible. I am new to scripting but I have tried to make this script.

wait(1)
local StarterGui = game:GetService('StarterGui')
local timegiver = StarterGui.TimeGUI.ImageLabel
local energy1 = StarterGui.EnergyGUI.Run
local energy2 = StarterGui.EnergyGUI.Walk
local energy3 = StarterGui.EnergyGUI.Energy
timegiver.Visible = false
energy1.Visible = false
energy2.Visible = false
energy3.Visible = false

There is other code in between that but that is just Tweening the GUI. This script is a LocalScript inside the Frame inside the IntroGUI that is inside of ServerStorage.

1 answer

Log in to vote
1
Answered by 8 years ago

StarterGui

You have made the unfortunate mistake of using the StarterGui instead of the PlayerGui. Repeat after me: "I will not change things in StarterGui"
Good boy.

If you need to change something in the StarterGui, you want to instead make sure that you're checking inside the PlayerGui (Which is obviously found in Player.PlayerGui incase you didn't know). Anything found under StarterGui can be found the same way under PlayerGui.

0
Thanks so much! BennyBoiOriginal 293 — 8y
0
Lol User#11440 120 — 8y
Ad

Answer this question