Loader:
1 | function onPlayerEntered(plr) |
2 | print ( "Player Added" ) |
3 | workspace.Intro:Clone().Parent = plr.PlayerGui |
4 | end |
5 | game.Players.PlayerAdded:connect(onPlayerEntered) |
6 | print ( "Loaded Intro" ) |
Remover:
1 | wait( 3 ) |
2 | PlayerGui.Intro:Destroy() |
For some reason this is not working, help?
You can add a few WaitForChild's so it would work in the game and you can combine the Loader and Remover.
Please explain if this is a script or local script
If script use this code; Note: Make sure that the Intro Gui is in replicated Storage
1 | game.Players.PlayerAdded:connect( function (Plr) |
2 | print ( "PlayerAdded" ) |
3 | game.ReplicatedStorage:WaitForChild( "Intro" ):Clone().Parent = plr.PlayerGui |
4 | print ( "Intro Cloned" ) |
5 | wait(HOWLONG YOU WANNA WAIT) |
6 | plr.PlayerGui:WaitForChild( "Intro" ):Destroy() |
7 | end ) -- May or may not have to remove ")" |
Put the brackets after Destroy