How to move a model directly below a part?

  1. What do you want to achieve?
    I want a model to be directly below an object but still above the surface of the floor.

  2. What is the issue?
    The issue is, the model is not below the object, and if I adjust it lower, it goes below the floor.
    image

  3. What solutions have you tried so far?
    I tried adjusting the CFrame, the line of code that moves the model, but none have succeeded.
    I noticed that some rigs work and some rigs don’t so maybe it depends on the rig?

This is the line of code that moves the model:

CrucifixRunes:MoveTo(Vector3.new(targetModel.PrimaryPart.Position.X,targetModel.PrimaryPart.Position.Y-15,targetModel.PrimaryPart.Position.Z))

I think you should be getting the bounding box of the model to retrieve the size.

(I believe it is called GetExtentsSize now.)

It’s on the surface of the floor now, but it’s not at the position of the target.

This is the updated code:

		local extentSizeTarget = targetModel:GetExtentsSize()
		CrucifixRunes:MoveTo(Vector3.new(extentSizeTarget))

Perhaps you could get the Y position of the feet and lower it to there?

I found out that it is the rig that’s making it bug, but thanks for answering!

1 Like

That’s because, well, extents size is a vector3. Also, it is the size of the model, not the position.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.