In the output, things work as expected with red alternating being printed with blue, but in game, even with both conditions being true my part remains blue. I expect blue and red to alternate like in the output. I don't understand why information from output doesn't match up with the color of the brick.
local Point_A = game.Workspace.Points.Point_A
while true do
wait(1)
for i, v in pairs(game.Players:GetChildren()) do
if v.Character then
if (v.Character.Torso.Position - Point_A.Position).magnitude < 15 and v.TeamColor == BrickColor.new("Really blue") then
Point_A.BrickColor = BrickColor.new("Really blue")
print("Set to blue")
end
end
if v.Character then
if (v.Character.Torso.Position - Point_A.Position).magnitude < 15 and v.TeamColor == BrickColor.new("Really red") then
Point_A.BrickColor = BrickColor.new("Really red")
print("Set to red")
end
end
end
end

3 comments
sorry my gramar suck
cus its encapsulated in the first statement
but his format very wierd