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

How to script a color changing flag according to the team color who touched it?

I want to have a flag and 2 teams. One team is Red and the other is Blue. So if the flag is touched by a team the flag changes to the color of the team who touched it. I created both teams using the "Teams" file and adding the "Team" option in it.

Here is the location of the teams I made:

game.Teams.["Blue Team"] game.Teams.["Red Team"]

I need to know how to script that please.

1 comment

0

Try this

1 answer

Try this,

	~~~~~~~~~~~~~~~~~

script.Parent.Touched:connect(function(hit) local h = hit.Parent:FindFirstChild("Humanoid") if h.Team = ("Blue Team") then script.Parent.BrickColor = BrickColor.new("Bright blue") elseif h.Team = ("Red Team") then script.Parent.BrickColor = BrickColor.new("Bright red")


let me know if that works if it doesn't i will try my best to fix it <3

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