I have a part and I need to make it change 3 colors every 2 seconds using an infinite loop. I need suggestions or if possible a script.
No need to send me Roblox documents explaining how can I make this
I m not a scripter.
Might not be the most optimal, but it sure does get the job done.
Insert a Script into the part and paste this in.
Change the RGB values in the “colors” table to the ones of your liking.
local waitBetweenColors = 2
local part = script.Parent
local TweenService = game:GetService("TweenService")
local colors = {
Color3.fromRGB(255, 255, 255),
Color3.fromRGB(255, 255, 0),
Color3.fromRGB(255, 0, 0)
}
while task.wait() do
for i, v in pairs(colors) do
TweenService:Create(part, TweenInfo.new(waitBetweenColors, Enum.EasingStyle.Linear), {Color = v}):Play()
task.wait(waitBetweenColors)
end
end
1 Like