How to move a model without objects being inside another

How do I move a model around with my mouse using Mouse.Hit.p, but not have it be inside an object? Like, I want the feet not to be inside the ground when moving it.

What type of computer are you on?
Have you searched this on the dev forum or googled it before posting this topic?

I’ve tried to google it, but I don’t know how to word it without making it like fifty words long, and what do you mean “What type of computer [am I] on?”

Well your controls may differ between computers.

I guess you can just use the move tool instead of using Mouse.Hit.p, no reason to stress yourself out.

I’m doing a tower defense game, so I do have to sort of stress myself out.

You should still be able to center it right using the move tool, I do not really see the big deal here.

If I am wrong is there more depth to it? If so please explain more.

Not sure if this will help you, but my placement system takes the size of the y axis and places the model at mouse.p plus half of the size on the y axis. This only works if your model is halfway in the ground, but i’m not sure what you really want.

2 Likes

I’m talking about tower placement inside the game, having the object be moved while inside the game. I literally cannot use the move tool inside the game, nor can the other players. They aren’t gonna act it out inside Roblox Studio.

So your saying you want players to move towers throughout the game using something?
Well, in that case I am not sure I can help you.

this should help

That’s what I’ve been doing, but a bit are still under ground because I’m moving it via SetPrimaryPartCFrame, and the primary part is the Root part.

Use model:getBoundingBox and create a part and set it as the primarypart, which will have the position of the center of the model.

1 Like