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

Wont remove the Gui after wait(3)?

Loader:

function onPlayerEntered(plr)
        print("Player Added")
workspace.Intro:Clone().Parent = plr.PlayerGui
end
game.Players.PlayerAdded:connect(onPlayerEntered)
		print("Loaded Intro")

Remover:

wait(3)
PlayerGui.Intro:Destroy()

For some reason this is not working, help?

3 comments

0

First off... 'AdvancedCode' l0l

0

Whats wrong with my name

0

Nothing. It's a better name than "thehybrid576" lol

2 answers

✓ Accepted answer

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

game.Players.PlayerAdded:connect(function(Plr)
	print("PlayerAdded")
	game.ReplicatedStorage:WaitForChild("Intro"):Clone().Parent = plr.PlayerGui
	print("Intro Cloned")
	wait(HOWLONG YOU WANNA WAIT)
	plr.PlayerGui:WaitForChild("Intro"):Destroy()
end) -- May or may not have to remove ")"

7 comments

0

It is a Script, your code does not work either.

0

I also removed the ")" to troubleshoot and did other things as well however they did not work.

0

No the ")" stays there because you are using an anonymous function. Your first line should be: game.ReplicatedStorage.Intro:Clone().Parent = plr.PlayerGui

0

Also change that wait time to 5

0

Still does not work.

0

I fixed it now, thanks!

0

Np

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