Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
314cake 17
6 years ago
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?

0
`while h < 360 do` TheeDeathCaster 2368 — 6y

2 answers

Log in to vote
0
Answered by
UgOsMiLy 1074 Moderation Voter
6 years ago
Edited 6 years ago

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
0
Thank you! 314cake 17 — 6y
Ad
Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
6 years ago
Edited 6 years ago

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.)

Answer this question