Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I create a script that makes a ScreenGui disabled?

I'm trying to make an intro with a black screen, then wait 5 seconds and the screen disappears revealing the game. Why doesn't this script work?

wait(5)
game.StarterGui:WaitForChild("ScreenGui").Enabled = false
end

The black screen is a frame set inside of the ScreenGui.

1 answer

✓ Accepted answer

You need to access the PlayerGui, and make sure you do it in a LocalScript.

-- localscript
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = playerGui:WaitForChild("ScreenGui")

wait(5)
screenGui.Enabled = false

Hope this helps! :)

2 comments

0

It did! Thanks!

0

accept his answer :d

This discussion is preserved as it was. New answers, comments, and votes are closed.