How to make it so when an entity is touched by another entity it dies

ok aso me and gamerxi are making an fps .io game and we needd to know how to make it so when an entity is touched the other entity respawns or dies heres the lnik to the project:PlayCanvas | HTML5 Game Engine

You can add a collision component for bodies on the scene and listen for a collisionstart event on the main entity, which is returned by the pc.ContactResult object. Next, you can get the property other, which contains another entity, the one with which the contact occurred. Then, you can add a verification condition, for example, by the name of the entity, to determine the entity you need and execute, for example, an event that destroy the detected entity from the scene.

uhh thnx for tht info