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

How to set when home team with backdrop 1, and away team with backdrop 2?

I have a team randomizer script, then there is a gui named "Scoreboard" and an ImageLabel named "HBackdrop" and "ABackdrop" I want for each team there to be a certain color for the back drop for it. This is what I have so far.

gui = Instance.new("ScreenGui",game.StarterGui) for i,Team in pairs (game.Teams:GetChildren()) do local img = Instance.new("ImageLabel",gui) img.Name = Team.Name img.BackgroundColor3 = Team.TeamColor.Color end

1 comment

0

Format your code in Lua Code Block please.

1 answer

Although I'm not sure if I can help with this script, I've written it into Lua Code Block to make this easier to answer.

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

for i,Team in pairs (game.Teams:GetChildren()) do
	local img = Instance.new("ImageLabel",gui)
	img.Name = Team.Name
	img.BackgroundColor3 = Team.TeamColor.Color
end

1 comment

0

Ok i made local's rteam which is away team. bteam which is home team.

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