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

How can I get this gui based board game to work?

The gui changes are only visible to the first person to join the game, and even then not all player slots change to the player's profile image. Here's the script:

function PlayerAdded (player)
	if game.Players.NumPlayers == 1 then
		script.Parent.Player1.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..player.Name
	end
	if game.Players.NumPlayers == 2 then
		script.Parent.Player2.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..player.Name
	end
	if game.Players.NumPlayers == 3 then
		script.Parent.Player3.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..player.Name
	end
	if game.Players.NumPlayers == 4 then
		script.Parent.Player4.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..player.Name
	end
	if game.Players.NumPlayers == 5 then
		script.Parent.Player5.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..player.Name
	end
	if game.Players.NumPlayers == 6 then
		script.Parent.Player6.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..player.Name
	end
end

game.Players.ChildAdded:connect(PlayerAdded)

1 comment

0

Oh, and this is a regular script

1 answer

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