Spawn Sytem and collider-Trigger to disabling / re-enabling same Collider in a While

I want a trigger-collider to my Spawn script which will then be a area. so when you have triggered then the same Collider will become disable for a while (like maybe 20 minuits, more or less) and comes back up

if I do a example to example it,

I have a house, inside the house I have 3 spawns and as soon as you walk into the house then it will spawn from the 3 spawns. you go in and take them. you should not be able to walk out of the house and back in and get 3 things again,but I’ll still be able to go into the house but then it will not spawn anything for you have to wait maybe 20 minutes before you can go into the house again and it will then spawns 3 things again And if you go in to the house before 20 minutes has gone, there will not be any items, because the Collider should be disabled.

So now I wonder if you can the solution for it to work :slight_smile:

BIG ThX to you who will help me, Really appreciate it :slight_smile:

Here is the logic for turning your collider off and then back on 20 minutes later. Put these lines in the script where you want to disable the collider:

collider.enabled = false;
Invoke("ColliderOn", 1200.0);

Add this function:

function ColliderOn() {
       collider.enabled = true;
}