Highlight color

Hello. How to make the highlight in the Liquid Resonance tool change color to random every millisecond.
Help with script.

image

3 Likes

well, first we need to know what colour to change, interior or outline?
second, the minimum for fast time is a 1/60th of a second (a tick) which is achieved with task.wait()

1 Like
while task.wait() do
script.Parent.Highlight.Color = Color3.fromRGB(math.random(255), math.random(255), math.random(255))
end
2 Likes

that errors
first, you do while task.wait() end which doesnt work
second, Highlight.Color isn’t a thing
third, you are doing math.random(255) which should be math.random(0, 255)
https://create.roblox.com/docs/reference/engine/classes/Highlight
https://create.roblox.com/docs/reference/engine/libraries/math#random

1 Like

This works.

My bad, the OP can either use OutlineColor or FillColor

1 Like

that should be

while task.wait() do

end

It works without a start range.

Yup, I apologize for the tiny oversight.

Guys, it work, but i need outline.

while task.wait() do
script.Parent.Highlight.OutlineColor = Color3.fromRGB(math.random(255), math.random(255), math.random(255))
end
4 Likes

Instead of Color in @bytesleuth’s script use OutlineColor.

Thank you guys. They helped me a lot, I did not think that the script is so simple.

you should replace while loops whenever you can using RunService.Heartbeat and RunService.Stepped

RunService.RenderStepped works but its client only

game:GetService("RunService").Heartbeat:Connect(function()
   script.Parent.Highlight.OutlineColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255)
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.