I've been working for so long on a new map spawning in a lot of pine trees. After all my work I noticed the objects in the pine trees weren't anchored I made a group of all the pine trees called "PineTrees" inside there I put a normal script to try to anchor all the objects in the groups. It ended up throwing the error "GetDescendant is not a valid member of Model". Here's the script:
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
You are missing an "s" on your :GetDescendants()
I believe the function you are looking for is :GetChildren() It will find all the children.