I want to create a brick that phases between certain picked colors smoothly using Color3, for example;
The color of the brick starts from 89, 97, 135 then phases to 92, 100, 138 with an increasing increment with 0.1.
I want to create a brick that phases between certain picked colors smoothly using Color3, for example;
The color of the brick starts from 89, 97, 135 then phases to 92, 100, 138 with an increasing increment with 0.1.
Like ForeverBrown says, using TweenService may be of use to you. Here's a sample of how it'd look in your case:
local TweenService = game:GetService("TweenService")
local part = workspace.Part -- at the starting color
local goal = { Color = Color3.fromRGB(92, 100, 138) } -- list of properties the part finishes with
local info = TweenInfo.new(3) -- you can use the wiki to edit this.
local tween = TweenService:Create(part, info, goal)
tween:Play()
Here's the article.
Thanks, any way to loop it to make it from the first color to the second color, then go back?
Nevermind, just realised the answer.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Take a look into the TweenService https://developer.roblox.com/en-us/api-reference/class/TweenService
^