How to make rainbow decal

Hello guys, my friend need help with making Rainbow Decal.


Here example

All decals have a ‘Color’ property.

You can use something like this and instead of doing Brick.Color, just use the Decal.Color property.

Kind of trash example, but you can see the decal’s color got changed to what I set it above.

for i = 1, 255 do

decal.Color3 = Color3.fromHSV(i/255, 1, 1)

wait()

end

You can put it in a while loop

Hm, my friend need like for part. not decal image.

Then use Color instead of Color3

------------What’s the output?


There is no variable Decal!

Replace it with RAINBOWFX and put a wait() function in the loop.

local RAINBOWFX = workspace.Pet.RAINBOWFX
local speed = 1
while true do
for i = 0,1,0.001*speed do
RAINBOWFX.Color = Color3.fromHSV(i,1,1)
wait(1)
end
end
Where i need put this, very confused

local RAINBOWFX = workspace.Pet.RAINBOWFX
local speed = 1
while true do
for i = 0,1,0.001*speed do
RAINBOWFX.Color = Color3.fromHSV(i,1,1)
wait()
end
wait() -- right there
end
while true do
wait() -- or here 

-- ignore this part --

end


Hm, look it’s work but then it’s stop in red.

local RAINBOWFX = workspace.Pet.RAINBOWFX
local speed = 1
while true do
	for i = 0,1,0.001*speed do
		RAINBOWFX.Color = Color3.fromHSV(i,1,1)
		wait()
	end
	while true do
		wait(0)
	end
end

Possibly the decal is slightly transparent and you have a gui on top on it that is also partially transparent change color?

no, it’s not have gui, only Decal in Pet Model.

Because you start an endless loop after changing colors.
You need to do:

while true do
	for i = 0,1,0.001*speed do
		RAINBOWFX.Color = Color3.fromHSV(i,1,1)
		wait()
	end
	wait()
end
1 Like