I'm currently working on a terrain generator and I need trees to stick in the ground. Here is a snippet of the part I need help with. How do I get it so that the trees go into the ground besides hover above the ground? Thanks!
if rn > 200 and rn <= 300 then
local treeClone = tree:Clone()
treeClone.Parent = treeModel
treeClone:MoveTo(p.Position + Vector3.new(0, p.Position.Y/2 - 10, 0))
end

1 comment
You need to set a primaryPart and use SetPrimarypartCFrame if you don't want collision involved in your positioning.