So far I have this but it just sets it to the b color. I don't know what to do.. if color3 doesn't have an alpha. How would I achieve this?
Basicly trying to ramp white to red base off t
local GUI = game.StarterGui.ScreenGui
local frame = GUI:WaitForChild("Frame")
function lerp(a, b, t)
t = math.clamp(0, 1, 1)
return Color3.new(
a.r + (b.r - a.r) * t,
a.g + (b.g - a.g) * t,
a.b + (b.b - a.b) * t
)
end
frame.BackgroundColor3 = lerp(Color3.fromRGB(255,255,255), Color3.fromRGB(255,35,35), 0.5)

3 comments
I forgot that clamp rounds your number.. :P
it doesn't, Color3.new just takes values from 0 to 1 but you're lerping it from 0 to 255
nope, it works just as it should, the math.clamp round 0.5 to 1