如何将零件的“尺寸”值存储在变量中?

时间:2019-10-26 10:02:49

标签: variables lua size roblox

我试图弄清楚如何在变量中存储零件的大小。

这是我的脚本:

while wait() do 
    local Intval = game.ReplicatedStorage.SizeNumb.Value
    script.Parent.Size = Intval
end

我收到的输出是

Workspace.Part.Script:12: bad argument #3 to 'Size' (Vector3 expected, got number)

1 个答案:

答案 0 :(得分:0)

您需要像这样分配Vector3值:

script.Parent.Size = Vector3.new(1, 2, 3)