Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Fade in and out colors script?

I am trying to make it so that the parent of the script (the part) will fade colors in and out. I am fairly new to scripting so this is probably wrong.

while true do
	script.Parent:connect(function(a,b,c)
	for i = 1, 255 do
		script.Parent.Color = Color3.new(+1, +1, +1)
	end
end)
if a = 255 and b = 255 and c = 255 then
	for i = -1,255 do
		script.Parent.Color = Color3.new(-1, -1, -1)
	end
end
if a = 0 and b = 0 and c = 0 then
	for i = 1,255 do
		script.Parent.Color = Color3.new(+1, +1, +1)
	end
end

end

1 comment

0

I think the for loops are where I went wrong

1 answer

✓ Accepted answer
while wait() do
	for i=0,255 do
	wait()
	script.Parent.BrickColor=BrickColor.new(Color3.new(i/255,i/255,i/255))
		if i==255 then
			for i=255,0,-1 do
			wait()
			script.Parent.BrickColor=BrickColor.new(Color3.new(i/255,i/255,i/255))
			end
		end
	end
end

that is probably not the effects you wanted but that is the best I could do from your script. errors I noticed were you didn't put a wait() , Color isn't a part's property,and if you add Color3, it only accepts numbers 0-1

This discussion is preserved as it was. New answers, comments, and votes are closed.