Hi, I have a question for scripting. So I am a programmer and for a while I was wondering how to be able to teleport players in front of specific things or how to calculate locations in front of a player.
For example. I want to make a script that teleports players in front of them by 10 studs. BUT for that I would need to know if the player is facing the X Axis or the Z Axis.
and another example I need help with, is how would I be able to teleport a player in front of a part or in this case a dummy. How do I calculate the location and get the x/z axis to match the location it needs to be teleported?
When you want to teleport something infront of another object X amount of studs, you’d primarily need to know where the object is that you want to teleport around and the direction you want to go.
In your case you would simply use the CFrame of the larger dummy’s HumanoidRootPart.
Get the Position and LookVector from that CFrame, multiply the LookVector with a number (that would be the distance), and add the multiplied LookVector to the position to get a new position infront of the large dummy.