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

Why does the guis only work on reset? (Very easy?)

Asked by 6 years ago
game.StarterGui.Catalog.Enabled = true
game.Lighting.SpectatorGUI.Enabled = true
0
Is there an ouptut error? MusicalDisplay 173 — 6y
0
No ANDREW50060 1 — 6y

2 answers

Log in to vote
1
Answered by 6 years ago

The StarterGui service clones the children inside it into the LocalPlayer's PlayerGui. So if we have a GUI with text inside there that says "Hello World!", it shows up on the screen as "Hello World!". If we change it inside the StarterGui, it doesn't get changed immediately. But if we reset after changing the text inside StarterGui, the children inside gets cloned again to the PlayerGui, making changes visible. If we change it inside the PlayerGui, you see the changes instantly. So rewrite it as this:

game.Players.LocalPlayer.PlayerGui.Catalog.Enabled = true

Hope I helped! If this was too hard for you to understand, just comment my answer.

Ad
Log in to vote
0
Answered by
oftenz 367 Moderation Voter
6 years ago
Edited 6 years ago

Change your code: game.Players.LocalPlayer.PlayerGui.Catalog.Enabled = true

0
Please explain your answer. Just giving them the correct code does nothing to help them learn. lukeb50 631 — 6y
0
I've been talking to him in chat. Remove the downvote. oftenz 367 — 6y

Answer this question