Help : Making A Draggable Crate


I’ve been trying to make a pickable crate that interacts with physics for a puzzle game, i dont have any screenshots cuz i sadly overwrote the save,
Bascially how i did it was to find the mouse hit position and then use a body position to move the crate there, However i found problem when the mouse aimed at the sky as the mouse.hit was nil, and also i wanna make it so the crate will be a certain distance away from the player constantly ( Unless on the floor or wall ect) I tried to use a raycast for this but that didn’t work either.

Any Thoughts on how to do this any improvments?


To prevent the sky problem you can put a statement if the clicked object is a part or a meshpart and for the offset you could probably use something like,0,0) to move away from the player

A totally awesome person helped me with a problem similar to this:
He sent me this link which helped me a lot and I hope it helps you too :smiley: