I am trying to make a Script that changes the Color of the Part clicked In order of the Colors I give it but I can't figure out how to make It select different Variables In order.
My Code:
local variable = script.Parent:WaitForChild("ClickDetector")
wall = script.Parent.Color
colors = {255,0, 0}{0,255,0}{0,0,255}
variable.MouseClick:Connect(function()
wall.BrickColor = BrickColor.Random(1, #colors)
end)

1 comment
Ohhh, I always used math.random Roblox has added so much since I used to be on here. Thank you so much for educating me!