-- This script is stored in ServerScriptService local ColorFloor = game.Workspace.ColorFloor:WaitForChild("ColorPlate") local ColorFloorChildren = ColorFloor:GetChildren() local function ColorChange() print("ColorChange() ran") for i, v in ipairs(ColorFloor:GetChildren()) do print("For loop ran") local randomnumber = math.random(1,1) print(randomnumber) if randomnumber == 1 then v.Color = Color3.FromRGB(0, 0, 0) elseif randomnumber == 2 then v.Color = Color3.FromRGB(255, 255, 255) elseif randomnumber == 3 then v.Color = Color3.FromRGB(255, 0, 0) elseif randomnumber == 4 then v.Color = Color3.FromRGB(0, 255, 0) elseif randomnumber == 5 then v.Color = Color3.FromRGB(0, 0, 255) end end end ColorChange()
I ended up fixing my issue by getting rid of WaitForChild()... I don't know why or how this broke my code. But, I'm not going to question it