# Trigger Problem (242948)

**URL:** https://discussions.unity.com/t/trigger-problem-242948/242948
**Category:** Questions & Answers
**Created:** [January 6, 2021, 5:20am UTC](https://discussions.unity.com/t/trigger-problem-242948/242948 "2021-01-06T05:20:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![eraban](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@eraban](https://discussions.unity.com/u/eraban)
#### Post date: [January 6, 2021, 5:20am UTC](https://discussions.unity.com/t/trigger-problem-242948/242948/1 "2021-01-06T05:20:53Z")

</div>

I have a 2D Object with a 2D box collider set to Trigger. It is the Time upgrade. The circle is the player.  
This is what happens:  
 ![173685-giphy-1.gif](https://europe1.discourse-cdn.com/unity/original/3X/8/9/89d2bb486d33ac003173b9a341b8bf1c9017dbdf.gif)  
The script is made to slow down time when the player triggers the collider.  
The player is not in contact with the collider but the time still slows down.  
There is no collider anywhere else which will slow down time.  
Please Help me

---

<div class="post-metadata">

### Author: ![antounk](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@antounk](https://discussions.unity.com/u/antounk)
#### Post date: [January 6, 2021, 6:50am UTC](https://discussions.unity.com/t/trigger-problem-242948/242948/2 "2021-01-06T06:50:39Z")

</div>

so; i’m guessing your you slow the time using something like this:

```
void slowTime()
{
    //do something to slow time
}

private void OnTriggerEnter2D(Collider2D collision)
{
    if (collision.CompareTag("x"))
    {
        slowTime();
    }
}

```

if so try using making a script called timeNormal() or something and put it in the ontriggerexit funcrion:

```
void timeNormal() {
//something
}

private void OnTriggerExit2D(Collider2D other)
{
    if (other.CompareTag("x"))
    {
        timeNormal();
    }
}

```

if that doesn’t help please send your script and i’ll see what i can do goodluck in your game
