Hello brandonkludke2,
Your question has already been answered, but I would just like to quickly clear some things up.
There was an answer which suggested using math.random. This is a start for picking a random Color3 color, and does indeed bring more variety, BUT there is another method which has less variety, but is much easier to remember.
First of all, I recommend taking a look at the properties and constructors of BrickColor here.
We'll be using the Random constructor and the Color property.
Now, onto your script.
BrickColor.Random() Returns a random BrickColor.
Adding .Color after the parenthesis would return the Color3 value of the BrickColor value.
local Light = script.Parent.Tile.PointLight.Color
while true do
wait (0.2)
Light.Color = BrickColor.Random().Color
end
I hope this helped! If you found this helpful, please don't forget to accept this answer.
-Vrakos
3 comments
math.random() already returns a number between 0 & 1, so in this case it would be fine using just that.
Oh yeah, I've mostly been using /255 and completely forgot about that, thanks for the refresher.
No problem.