Launch Code

PHOTO EMBED

Sun Aug 09 2026 23:02:17 GMT+0000 (Coordinated Universal Time)

Saved by @ItzStubZ

/* 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);
content_copyCOPY