教程链接:循环与 BrickColor
-- Changes the color of loopingPart every few seconds
-- Create a variable to store the part
local loopingPart = game.Workspace.LoopingPart
-- Looping Code
while true do
-- Changes loopingPart's color
loopingPart.BrickColor = BrickColor.new(0.7, 0.9, 0.9)
-- Wait 3 seconds before next instruction
wait(3)
loopingPart.BrickColor = BrickColor.new(0.9, 0.4, 0.9)
wait(3)
loopingPart.BrickColor = BrickColor.new(0.4, 0.5, 0.4)
wait(3)
end
上面是教程中的代码,试了一下颜色值只能填浮点数。应该是0~1之间的浮点数吧,但是是为什么呢?怎么和正常使用的RGB值进行转换?小白对代码不甚了解,希望有大神赐教!