Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Lerp (Linear Interpolation) is still not working. Can somebody help?

for i = 0,1,0.07 do
print(i)
Frame.BackgroundColor3 = Frame.BackgroundColor3:lerp(Color3.fromRGB(183,183,183), i)
wait(0.01)
end

i'll leave you to it

1 comment

0

What does "not working" mean?

1 answer

It should work, so there must be an unrelated issue in the context. However, note that it will not be linear if you do it like that, since you are lerping the same value that is constantly changing. For a linear change you should use the original color.

local original = Frame.BackgroundColor3
for i = 0,1,0.07 do
print(i)
Frame.BackgroundColor3 = original:lerp(Color3.fromRGB(183,183,183), i)
wait(0.01)
end

1 comment

0

oh thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.