I want to make a script (Not a gui) That will change everyones team. I have no idea how to do this. I know I would put this: -Part -ClickDetector -Script But then the script is where I hit trouble. I really, really need help with this. It's one of the last few scripts I need to finish my game. If you can at the very least push me in the right direction, that'd be great. If it makes any difference to anyone, the teams colors are: "Really red" "Bright yellow" "Bright blue".
Make sure to put the script in the part, not in the click detector. This script here should work.
Team = "Really Red" --Put the team everybody goes to here Click = script.Parent.ClickDetector function onClick() for i, v in pairs(game.Players:GetChildren()) do --oh how I love v in pairs v.TeamColor = BrickColor.new(Team) end end Click.MouseClick:connect(onClick)
Fairly simple to be honest. Good luck on your game!