Color Fade (Help)

I’m not much of a Scripter haha, Took a script from a color fading Surface GUI and put it into a part. Change the parts that had “BackgroundColor3” to “BrickColor”. absolutely did something wrong so i am seeking for help to figure this problem out. :smile:

while true do
	for i = 0,2,0.05 do
		script.Parent.BrickColor = script.Parent.BrickColor:lerp(Color3.new(255/255, 18/255, 225/255), i / 100)
		wait()
	end
	for i = 0,2,0.05 do
		script.Parent.BrickColor = script.Parent.BrickColor:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100)
		wait()
	end
	for i = 1,2,0.05 do
		script.Parent.BrickColor = script.Parent.BrickColor:lerp(Color3.new(43/255, 170/255, 255/255), i / 100)
		wait()
	end
	for i = 1,2,0.05 do
		script.Parent.BrickColor = script.Parent.BrickColor:lerp(Color3.new(43/255, 255/255, 50/255), i / 100)
		wait()
	end
	for i = 1,2,0.05 do
		script.Parent.BrickColor = script.Parent.BrickColor:lerp(Color3.new(245/255, 255/255, 46/255), i / 100)
		wait()
	end
	for i = 1,2,0.05 do
		script.Parent.BrickColor = script.Parent.BrickColor:lerp(Color3.new(255/255, 0/255, 0/255), i / 100)
		wait()
	end
end
2 Likes

Change BrickColor to Color, and Color3.new to Color3.fromRGB.

2 Likes

Also, here is your new best friend: TweenService | Documentation - Roblox Creator Hub

3 Likes

Thank you! You see just a small mistake like that. Looks like i need to get to studying…

1 Like