Question: I use this script to make the part spawn 6 studs in front of the player in whatever direction it looking. If the player is looking down then the part would spawn below the ground.
I was wondering if there was any way to make it spawn exactly in front of the player every time no matter where the player is looking. Since my game has a lot of ragdoll and combat this can cause lot of bugs in the combat.
Convert rootpart lookvector into a unit vector (magnitude of 1) with the Y component removed so it doesn’t go underground, then multiply that unit vector by 6 so you have a vector of magnitude of 6 (6 studs in front of the player)