I am trying to make the brick change color, but it does not work. It goes transparent, then it just stops. Please help. Thanks!
sphere = script.Parent a = 0 repeat
sphere.Rotation = Vector3.new(3, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(6, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(9, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(12, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(15, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(18, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(21, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(24, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(27, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(30, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(33, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(30, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(27, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(24, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(21, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(18, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(15, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(12, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(9, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(6, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(3, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(0, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-3, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-6, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-9, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-12, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-15, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-18, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-21, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-24, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-27, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-30, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-33, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-30, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-27, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-24, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-21, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-18, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-15, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-12, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-9, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-6, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-3, 0, 0) wait(.01) a = a+3 sphere.Rotation = Vector3.new(-0, 0, 0) wait(.01) a = a+3
script.Parent.Transparency = 1
script.Parent.BrickColor=BrickColor "Green"
script.Parent.Transparency = 0
until pigs == 1
It should be script.Parent.BrickColor = BrickColor.new("Green")