I’m trying to make a teleport script with a limit on distance. However when I add the limit, it just stops you from teleporting all together. So I wanted it to be that it would teleport you in the direction you wanted, but only to your teleport distance.
I basicly just need the equation for this, I’ve been searching and can’t find it anywhere.
I’ve already done the keybinding and stuff.
I already have that I’m talking about how to calculate what happens with the distance is too far away.
When its too far I want it to still teleport you but only teleport you the max distance your allowed.