for i = 1, 100, .01 do
wait()
script.Parent.BackgroundColor3 = Color3:lerp(30, 41, 255, 1)
end
Whenever I play the game, it says "attempt to call method 'lerp' (a nil value)"
Help is appreciated, thanks :D
for i = 1, 100, .01 do
wait()
script.Parent.BackgroundColor3 = Color3:lerp(30, 41, 255, 1)
end
Whenever I play the game, it says "attempt to call method 'lerp' (a nil value)"
Help is appreciated, thanks :D
It is returning nil due to the fact you are calling it to Color3. You should call it on it after you construct it with the constructor. If you are using .new you should do r / 255 g / 255 b / 255 since it receives decimal values however with .fromRGB you can use your current values
script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100) -- I'm pretty sure this is what you want to do
or with .fromRGB
script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3:lerp(Color3.fromRGB(30, 41, 255), i / 100)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Reading this over it seems so bad but whatever