Collision detection with result

I am using a shooting script which sends out a physical bullet, so i need a way to detect what the bullet hits, so that way if the result name is the other player it will do dmg to them, but is there a code for detecting collisions like that? Thanks in advance

Hi @Gavin_Durbin! I think it’s something like below.

Collider.prototype.onCollisionStart = function (result) {
    if (result.other.name === "Player") {
        // player is hit
    }
};

1 Like

Oh wow! Thank you, that’s so simple lol