/* 1. Grab the looking direction vector array: [X, Y, Z] */ let facing = api.getPlayerFacingInfo(playerId).dir; /* 2. Multiply the angles by your desired launch speed (Multiplier) */ let speedMultiplier = 40; let launchX = facing[0] * speedMultiplier; let launchY = facing[1] * speedMultiplier; let launchZ = facing[2] * speedMultiplier; /* 3. Apply the 4-argument impulse payload natively to the clicking player */ api.applyImpulse(playerId, launchX, launchY, launchZ);