Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago
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

0
What does "not working" mean? BlueTaslem 18071 — 7y

1 answer

Log in to vote
1
Answered by
cabbler 1942 Moderation Voter
7 years ago

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
0
oh thanks! mightydifferent 85 — 7y
Ad

Answer this question