Okay, hears the script from the game.
script.Parent.BrickColor=BrickColor.Random()
wait(1)
end
Okay, hears the script from the game.
script.Parent.BrickColor=BrickColor.Random()
wait(1)
end
your current script will only run once changing the brick color. you could do this to make the brick (the parent) change color indefinitely:
while(wait(1))do
script.Parent.BrickColor=BrickColor.Random()
end
This will work, but you will have to have the script inside each one of the bricks.
You can instead have one script for all your parts in your disco floor. Do this by grouping all the parts together and putting this script inside the model:
--get all the children of the model
children = script.Parent:GetChildren()
--changes all the parts brick color to a random part every second
while(wait(1))do
--look through all the children inside the model
for i, child in ipairs(children) do
--check if child is a part
if(child:IsA("BasePart"))then
--change color
brick.BrickColor=BrickColor.Random()
end
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
did you put this in a loop? it seems like youre missing a section of your code...
Maybe not.
why is there a random end at the bottom even tho its not in a visible loop?
This should be pretty easy to s