This script is supposed to create a selection box, and place it in the user's Left Arm. The script is supposed to make the SelectionBox "Cyan" by default, but if the players teamcolor is "Bright red" then make the selection box color "Bright red". The problem is that the SelectionBox is always red for all the characters, even if they aren't on the red team.
game.Workspace.ChildAdded:connect(function(Character)
wait()
repeat wait() until game.Players.LocalPlayer
local p = game.Players.LocalPlayer
local box = Instance.new("SelectionBox")
box.Parent = Character["Right Arm"]
box.Adornee = Character["Right Arm"]
box.Color = BrickColor.new("Cyan")
wait()
if p.TeamColor == BrickColor.new("Bright red") then
wait(.5)
box.Color = BrickColor.new("Bright red")
end
end)
