problem with collisions with tag

I have made a point cube prefab in my splitscreen FPS that the player drops when they die, when the player walks over it the cube destroys itself using a collision based scritp that only triggers if the colliding object’s tag is “Player” but for some reason the cubes destroy itself when hit buy a player’s bullet even though the bullet’s tag is not “Player” but I created a custom one called “bullet”

Anyway I can fix this?

Please provide us with the script you use. The information you have given isn’t enough to pinpoint the problem.

Collision is determined by the layer an object is on, not its tag. If bullet is placed in a separate layer, you can disable collision between bullets and the cube by using the Collision matrix in Edit > Project Settings > Physics. The intersection of a row and a column represent a pair of layers that can collide with each other. Simply uncheck the box at the intersection of the cube’s layer and the bullet layer.

oh yeah forgot about my script

here’s the script im using for the cube

function OnCollisionEnter(collision: Collision) {

if (collision.gameObject.tag == “player”);

Destroy (gameObject);

}