我一直在玩弄它,但它不起作用,下面是我的代码:
color = Color3.new(math.random(255),math.random(255),math.random(255))
print(color)
script.Parent.BackgroundColor3:lerp(color,0)发布于 2017-09-10 23:28:34
Color3:lerp是在两个Color3值之间进行插值的一种方法。它基本上是CFrame:lerp of Color3。
您提供的代码不能工作是因为您将lerp的lerp参数设置为0。下面是一个如何正确使用它的示例:
local newColor = Color3.new(math.random(255), math.random(255), math.random(255))
for i=0,1,0.1 do
script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3:lerp(newColor, i)
wait()
endhttps://stackoverflow.com/questions/46144720
复制相似问题