Random particle emitter color from really red to really black

So i want to generate a random color from value 0 to 255
But… I get this error each time i try something different:
image
It’s really annoying.
Script:

while task.wait() do
	local random = math.random(0,1)
	local color = Color3.new(random, random, random)
	local randomcolor = ColorSequence.new(color)
	script.Parent.Color = color
	for _,v in pairs(script.Parent.Attachment:GetChildren()) do
		if v:IsA("ParticleEmitter") then
			v.Color = color
			task.wait()
		end
	end
end
1 Like

You are trying to give it a Color3 as value, but it is a ColorSequence, instead of using a Color3 put it inside the following:

local color = Color3.new() -- your color
emitter.Color = ColorSequence.new(color) -- put this in there
1 Like

BUT THEN WHEN I TRY A COLOR3
I GET THIS ERROR:
image

1 Like

oh wait it was cuz there is a part included in my script
silly me

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.