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 make a Gui go into all of the Players PlayerGui?

Well I've got this whole Gui script made out and it works just fine when I hit the Run Button, but when I press the Play Solo button the Gui does not appear at all.

here's a string of code where I think the problem is.

a = Instance.new("ScreenGui", game.StarterGui)

I want it to go to the PlayerGui instead of the StarterGui, but I'm just not sure how you would do that.

Thanks, BB1

1 answer

✓ Accepted answer

By using the PlayerAdded function, you can tell when a player first joins the game. But if you want to give it to every character that spawns, you can use the CharacterAdded after PlayerAdded was already called. Your script should look something like this when completed:

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		a = Instance.new("ScreenGui", player.PlayerGui)
		-- Rest of Gui stuff here
	end)
end)

1 comment

0

Thanks for the help! I'm going to get right on it.

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