Add a script inside your pet and set it’s RunContext to client for the best visuals.
Paste this inside the script:
--//Variables
local Part = script.Parent
--//Loops
while Part:IsDescendantOf(workspace) do
for i = 0, 1, 0.001 do
if not Part:IsDescendantOf(workspace) then
break
end
Part.Color = Color3.fromHSV(i, 1, 1)
task.wait()
end
end
This should work if you’re changing the color of a pet.
while wait() do
for i = 0,1,0.001*speed do
game.ReplicatedStorage.Pets.Rarities.Developer.Color.Value = Color3.fromHSV(i,1,1)
task.wait() -- this line is new
end
end
You may also want to consider using your speed variable to wait rather than to increment i.