Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with scripting!?!?

Asked by 10 years ago

I'm trying to make a community building place. I already did that. All i want to do now is add a little design to the team colors so it flashes red, then green, every 1 second. The script wont work, here it is: [Plot# = the team]

while true do
    game.Teams.Plot1.TeamColor.Color.r = 255
    game.Teams.Plot1.TeamColor.Color.g = 0
    game.Teams.Plot1.TeamColor.Color.b = 0
    game.Teams.Plot2.TeamColor.Color.r = 255
    game.Teams.Plot2.TeamColor.Color.g = 0
    game.Teams.Plot2.TeamColor.Color.b = 0
    game.Teams.Plot3.TeamColor.Color.r = 255
    game.Teams.Plot3.TeamColor.Color.g = 0
    game.Teams.Plot3.TeamColor.Color.b = 0
    game.Teams.Plot4.TeamColor.Color.r = 255
    game.Teams.Plot4.TeamColor.Color.g = 0
    game.Teams.Plot4.TeamColor.Color.b = 0
    wait(1)
    game.Teams.Plot1.TeamColor.Color.r = 0
    game.Teams.Plot1.TeamColor.Color.g = 255
    game.Teams.Plot1.TeamColor.Color.b = 0
    game.Teams.Plot2.TeamColor.Color.r = 0
    game.Teams.Plot2.TeamColor.Color.g = 255
    game.Teams.Plot2.TeamColor.Color.b = 0
    game.Teams.Plot3.TeamColor.Color.r = 0
    game.Teams.Plot3.TeamColor.Color.g = 255
    game.Teams.Plot3.TeamColor.Color.b = 0
    game.Teams.Plot4.TeamColor.Color.r = 0
    game.Teams.Plot4.TeamColor.Color.g = 255
    game.Teams.Plot4.TeamColor.Color.b = 0
    wait(1)
end

1 answer

Log in to vote
0
Answered by 10 years ago

Interesting script :P

while true do
    game.Teams.Plot1.TeamColor = BrickColor.new("Bright red")
    wait(1)
    game.Teams.Plot1.TeamColor = BrickColor.new("Bright green")
    wait(1)
end

Would have the desired effect (I guess) but would make it difficult to manipulate teams for example if you wanted to assign a person to the red team but the color was on green it would error.

0
thanks! and by the way, im not assigning anyone to a team, it is a community building game, so there is no need to. each spawn is for a plot. each plot is the same. The_Sink 77 — 10y
0
oh... i cant do the teamcolor thing because it switches me to nuetral every time it changes, so i will just change the brick color of the spawns The_Sink 77 — 10y
Ad

Answer this question