【发布时间】:2020-06-21 15:42:27
【问题描述】:
我已经为一张在许多松树中生成的新地图工作了很长时间。在我完成所有工作之后,我注意到松树中的对象没有锚定我在里面制作了一组名为“PineTrees”的所有松树我放了一个普通脚本来尝试锚定组中的所有对象。它最终抛出错误“GetDescendant 不是模型的有效成员”。这是脚本:
local model = script.Parent
local childs = model:GetDescendant()
for I,v in pairs(childs) do
if v:IsA("BasePart") then
v.Anchored = true
end
end
【问题讨论】: