How I can make each tower change color when round resets?

as i’m starting to script, i don’t have a good idea of ​​how to do this, could someone help me?

image

1 Like

Use math.random

Blue = math.Random(0,255)
Green = same
Red = same

And where is Color3.RGB put(Red,Green,Blue)

(Put the blue,red,green .random inside the for loop so you have different numbers every time)

2 Likes

You can also use v.BrickColor = BrickColor.random()

3 Likes

In the towers table, do you have each of the “Floors” defined?
If you did, then you should try this.

local Towers = {Floor1, Floor2, Floor3, Floor4, Floor5}

for _, Floor in pairs(Towers) do
	for _, Part in pairs(Floor:GetDescendants()) do
		if Part:IsA("Part") then
			Part.BrickColor = BrickColor.Random()
		end
	end
end
1 Like

image

the script is giving this problem

Sorry, did a little typo. It’s GetDescendants()

1 Like