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

How to clone a GUI to a player when they first enter?

I've created a intro for a game but I only want it to show when the player first enters. For some reason my script isn't working. Maybe, it's because the game is FE? Can someone please help me out? (The script is located in ServerScriptService)

Code:

local Intro = script.AssetLoader:Clone()
game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:wait()
	Intro:Clone().Parent = player.PlayerGui
end)

1 answer

Michael, you made a little mistake, but it is okay. I happened to make those mistakes too.

So on line 1, you clone Intro. Then on line 4, you clone the cloned Intro. Which means you are cloning the clone. what? I know..

I fixed it for you below:

local Intro = script.AssetLoader
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:wait()
    Intro:Clone().Parent = player.PlayerGui
end)

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