Placing a model under a part and then Adding its size to the Position

so I’m making a Enemy System in a Tower Defense game, I want the enemy to be walking on floor like touching the floor, which i can do with placing the Enemy UNDER the Node/Waypoints of the map and then adding the Enemy Y Size to the under position.

But it doesnt work, like it just clip through the floor, this is how i do it

bottom_face_of_node_cframe * CFrame.new(0, model:GetExtentsSize().Y / 2, 0)).Position

I want them to stand above the bottom face of the node

Does anyone got a way to do that?

You should add the Vector3 position you want, which is not quite what you’re doing now

bottom_face_of_node_cframe + Vector3.yAxis * (model:GetExtentsSize().Y / 2)
1 Like

You can use a raycast to get a normal of surface

local polygonSize = MoveObject.Size * RayResult.Normal
MoveObject.Position = RayResult.Position + PolygonSize/2
1 Like