How to make a part stop à the right position

So i want to make that when i press a a part appear and go where my Mouse is and that when its hit a part the part will be anchored near the part that je touched . So all my script is working but idk why im using .touched To detect if the part as touched a part its working but its not perfect because with the collision or the lag or the detection the part doesnt stop near the part that he touched . The part stop beforr hitting it just like if the collision was an energy field for the part . So i want to fix that To get a partwho stop really the part that he touchrd so if u know how to fix that help me up :stuck_out_tongue:

For this, I recommend making a LocalScript, using the UserInputService to detect when “A” is pressed, and linking that to a function which creates a tween with Tween Service, then tweens it to the Mouse.Hit property of the player mouse, obtainable through:

game:GetService("Players").LocalPlayer:GetMouse();

After all of that, your part should tween successfully. Make sure the part is anchored the whole time.

EDIT: If you want to simulate an accelerating force colliding with an object, for the tween, use Quad and Out as your properties for the tween.