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

How do i repair my color loop changing script?

Asked by 5 years ago
Edited by DanzLua 5 years ago

--I've tried this script :

01B = game.Workspace.Part
02 
03while true do
04 
05B.BrickColor = BrickColor.new("Really red")
06 
07wait(2)
08 
09B.BrickColor = BrickColor.new("Really black")
10 
11wait(2)
12 
13end
0
i see no problem, You could make the script better by making B a local variable... greatneil80 2647 — 5y

1 answer

Log in to vote
0
Answered by
2ndwann 131
5 years ago
Edited by DanzLua 5 years ago

I think you should user Color3 instead of BrickColor. I usually use Color3 instead of BrickColor

Color3 uses Red/Green/Blue values instead of color names.

Use the script with Color3:

01B = game.Workspace.Part
02 
03while true do
04 
05B.BrickColor = Color3.new(255, 0, 0) -- makes the brick "Really red"
06 
07wait(2)
08 
09B.BrickColor = Color3.new(0, 0, 0) -- makes the brick "Really black"
10 
11wait(2)
12 
13end
Ad

Answer this question