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

How do you make a brick's color go under hue shift?

h = 0

while true do
	script.Parent.Color = Color3 Color3.fromHSV(h + 1, 255, 255)
	wait(0.1)
	if h == 359 then
		break
	end
end

For some reason, my script isn't working. Is there anyway I could fix, and make it hue shift indefinitely if possible?

1 comment

0

while h < 360 do

2 answers

✓ Accepted answer

Color3.fromHSV takes values from 0 to 1, 0 being the minimum value and 1 being the maximum (360).

for h = 0,360 do
	script.Parent.Color = Color3.fromHSV(h/360,1,1)
	wait()
end

To make this code run forever:

while true do
	for h = 0,360 do
		script.Parent.Color = Color3.fromHSV(h/360,1,1)
		wait()
	end
end

1 comment

0

Thank you!

you don't increase the value of h at all. add h = h + 1 somewhere in this loop. also you misstyped your color line (Might be something with copy pasting that went wrong, idk.)

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