Hey all, I’ve been trying to make it so that the disco tiles on the dance floor change to certain colors that I’ve selected, instead of making the tiles only change colors from the BrickColor pallet (currently using a randomize event to select random colors from the BrickColor pallet). Thought about adding certain colors to a table and it randomly chooses colors from that table, which might ultimately be how I do it although I’m not quite sure on how I’d do that necessarily. Mainly need colors that light up with neon appose to the ones which don’t light up as well with neon.
Script:
repeat wait(1)
for i, v in pairs (script.Parent.DanceFloorTiles:GetChildren()) do
v.BrickColor = BrickColor.Random()
end
until nil
local waitTime = 3 -- delay time
function colorChange()
for i, floor in pairs(workspace.danceFloorTiles:GetChildren()) do
floor.BrickColor = BrickColor.Random()
end
end
colorChange()
while true do
wait(waitTime)
colorChange()
end
Also if your script isn’t in server script service u might want to put it in there.
My initial plan was to put specific colors that I’ve selected into a table, ones that glow rather than the ones that are a flat color. By default they’re neon, just some colors than the others don’t glow as good as other colors. The script works, just want some clarification or explanation how I’d implement that into this script. I want colors that glow.
local function pickFromTable(list)
local index = math.random(1, #list)
--No Tab key in dev forums :(
for i, p in ipairs(list) do
if i == index then
return p
end
end
end