I saw a game where parts cycle through the colors of a rainbow, and I'd like to learn how this is done. This is as far as I've gotten, however the part just seems to flash between red and pink.
local H = 0 while true do Part.Color = Color3.fromHSV(H, 1, 1) H += task.wait() end
When using Color3.fromHSV your parameters should be in the range [0, 1]. To fix this just get the decimal portion of H, which can be done by using the modulo operator (%). a % b will give you the remainder of a when divided by b. This means H % 1 is just the decimal portion of H, which is in the range [0, 1).
Part.Color = Color3.fromHSV(H % 1, 1, 1)