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

(Reupload) Why doesn't my Gui become visible when it's suppose to?

Asked by 4 years ago

I made a script where when a certain part of something happens a Gui is suppose to be visible, but when the script works, the Gui doesn't become visible, but when I reset my character the Gui is there. Why can't the Gui appear when the script tells it to?

game.StarterGui.Crawl.Crawl.Visible = true
wait(10)
game.StarterGui.Crawl.Crawl.Visible = nil
0
Are you using a LocalScript? If not, do so. Hypgnosis 186 — 4y
0
And then use my answer in the local script. Hypgnosis 186 — 4y
0
it doesn't work, besides I found another solution and your answer helped me with it User#30241 0 — 4y

1 answer

Log in to vote
3
Answered by
Hypgnosis 186
4 years ago

Any changes made to StarterGui will have no effect, since StarterGui's contents are copied into something called PlayerGui when a player joins.

Also, use 'false' instead of nil.

local PlayerGui = game.Players.LocalPlayer:WaitForChild('PlayerGui')

PlayerGui.Crawl.Crawl.Visible = true
wait(10)
PlayerGui.Crawl.Crawl.Visible = false
0
Doesn't work User#30241 0 — 4y
Ad

Answer this question