Hello I am trying to make a projectile that tweens to the mouse but doesn’t tween past a certain distance
example
my mouse is 50 studs away from the player but after that the projectile stops at 50 studs but if my mouse is below 50 studs away from the player the projectile tweens to the mouse.
I have tried using the difference between the player’s humanoid root part’s cframe x ,y and z coordinates and the mouse x y and z then checking if they are above or below, but this didn’t fully fix the issue because you needed to be facing a certain direction for it to be accurate. I have a idea of how this can be done but that is for time and does not stop after a certain distance or stop at the mouse.
This is my first time posting on the dev forum
Any kind of help is welcome