Needing help with mouse.hit

So in my code, I’m having a part follow the characters mouse, but when it’s activated the part flies towards the camera? and also applies a rotation value based on the camera. How do I prevent both of these things from happening?


I basically just use a while true function to reapply the cframe from mouse.hit to the part.

Can’t remember the exact terminology, but you can set a single part as an ignore thing for mouse.hit. Ill quickly try to find it

edit:
https://create.roblox.com/docs/reference/engine/classes/Mouse#TargetFilter

1 Like

Very helpful thank you! I just need to figure out how to stop it from applying rotation to it now

You can probs set the position instead of the CFrame of the part to get rid of the rotation

(CFrame.Position can be used to get it from the mouse.hit thing)

1 Like

Not exactly sure but im pretty sure its Mouse.Target instead of Mouse.Hit as Mouse.hit is used when the player clicks something

Absolute god-send. Thank you so much!