Hello! Im still learning about scripting and Im curious, How would I Tween Colors In ROBLOX?
Works like any tween
local Color3Value= Instance.new("Color3Value",workspace)
game:GetService("TweenService"):Create(Color3Value, TweenInfo.new(1), {
Value = Color3.fromRGB(255, 255, 255)
}):Play()
1 Like
Will something like this work?
ScammersCaughtText.Color = ScammersCaughtText.Color:Lerp(Color3.new(0, 1, 0))
The lerp function gives you a value some percentage between two other values
So, blue:Lerp(red,0) gives you fully blue
blue:Lerp(red,1) gives you fully red
blue:Lerp(red,0.5) gives you half red half blue
blue:Lerp(red,0.25) gives you 25% red, 75% blue
Etc
This can be put in a for loop to smoothly lerp two colors as a manual alternative to tweenservice
for i = 0,1,0.01 do
part.Color = color1:Lerp(color2, i)
end
1 Like