collision not being detected

I’m new to unity and trying to make a little game.
I have a conveyor belt with spawning cubes and I’m able to make a cube visible (cube.active = true) on my forklift when I touch a cube with it.
What I’m trying to do is that when my forklift touches a particle object (fire) the cube then deactivates.
I’ve tried it with different objects and the only time it deactivates is when I make the forklift touch a cube.

static var itemAttached = false;

var carbonCubes : GameObject;
var copperCubes : GameObject;
var goldCubes : GameObject;

carbonCubes.active = false;
copperCubes.active = false;
goldCubes.active = false;

function OnCollisionEnter(hit : Collision){

if(hit.gameObject.name == 'Gold(Clone)' && itemAttached == false){
itemAttached = true;
goldCubes.active = true;	
}

if(hit.gameObject.name == 'Carbon(Clone)' && itemAttached == false){	
itemAttached = true;
carbonCubes.active = true;	
}

if(hit.gameObject.name == 'Copper(Clone)' && itemAttached == false){
itemAttached = true;
copperCubes.active = true;	
}

if(hit.gameObject.name == 'Flames2' && itemAttached == true){
itemAttached = false;
goldCubes.active = false;
copperCubes.active = false;
carbonCubes.active = false;	
}

}

Let me see if I understand this correctly: you want a cube to deactivate when it is touched by a particle? If so you would need to add a particle collider to the flame particle renderer inorder to get it to register a collision. In the menubar go to component > particles > legacy > world particle collider

Good luck,
Mike G.

The cube is a child of the forklift so I set it up that it activates when touching the boxes on the conveyor belt. I want it to deactivate when the forklift touches the fire.
The fire does have a world particle collider attached to it but it doesn’t help.

Ah aright I think I found your problem. Particle collisions are calculated in the OnParticleCollision() function so put your code for the particle collision in there

function OnParticleCollision()
{
//particle collision detection
//deactivate cube etc.
}