Hi! I’m trying to clone a part with a beam inside it. As I’m cloning the part with the beam, I want both of them (the part and beam) to change their color properties as soon as they are added into workspace.
I think the part changing color runs fine, but the beams in question comes back as an error saying ‘ColorSequence.new(): table expected.’ I’m using math.random to randomly get the rgb and the color sequence for the beams fyi.
I don’t know how to resolve this issue can someone please explain and help me?
Here is the code:
local ServerStorage = game:GetService("ServerStorage")
local interval = 5
local obj = script:WaitForChild("Ring")
local spawnOn = workspace.Baseplate
while spawnOn ~= nil do
print("Spawned Ring")
local r = math.random(1,255)
local g = math.random(1,255)
local b = math.random(1,255)
local Yheight = math.random(200,500)
local clone = obj:Clone()
clone.Color = Color3.fromRGB(r, g, b)
clone.Glow1.Color = ColorSequence.new(r, g, b)
clone.Glow2.Color = ColorSequence.new(r, g, b)
clone.Parent = workspace
task.wait(interval)
end