OnTriggerEnter Destroy without being asked for

Hello,

Sorry for that question that may appear dumb.

I’m creating a little Runner game, and player has possibility to catch powerup in order to slow time in this exemple.
I handled the slow timer timer thanks to a coroutine but… The problem is that on the OntriggerEnter collision with player, object is immediately destroyed without activating his functions, and moreover without activating Coroutine and so on.

Here is my code sample, hope to find problem before someone answer.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class PowerUps : MonoBehaviour
{
    GameObject player;
    GameManager gameManager;
    GameObject timeSlowedText;
    public float speed = 15.0f;
    void Start()
    {
        player = GameObject.Find("Player");
        timeSlowedText = GameObject.Find("TimeSlowed");
    }
    void Update()
    {
        transform.Translate(Vector3.back * Time.deltaTime * speed);
        DestroyOut();
    }
    void DestroyOut()
    {
        if (transform.position.z < -55)
        {
            Destroy(gameObject);
        }
    }
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Player"))
        {
            Debug.Log("PowerUp Activation");
            transform.Translate(player.transform.position.x, player.transform.position.y + 2.0f, player.transform.position.z);
            StartCoroutine("PowerUpTimer");
            Time.timeScale = 0.5f;
            //timeSlowedText.SetActive(true);
        }
    }

    IEnumerator PowerUpTimer()
    {
        yield return new WaitForSeconds(2);
        Time.timeScale = 1;
        Destroy(gameObject);
        Debug.Log("PowerUp Destroyed");
        //timeSlowedText.SetActive(false);
    }
}

The physics engine, which handles collisions and triggers, updates slower than Update(), it updates every fixedDeltaTime and not every deltaTime, so your Update() code finishes before the physics engine has a chance to run collision detection. When using colliders and the physics system, you always have to put your movement code in FixedUpdate(), not Update() for this reason. Also, you may want to do rigidBody.MovePosition() instead of transform.Translate(). I don’t remember specifically if changing the value of transform.position will instantly change the rigidBody.position, or if it changes after the next physics fixedUpdate, or what, so it may not matter but that’s typically how you are supposed to do it.

Thank you for your answer, I was far to understand the real problem… I’ll give it a try.
I didn’t used rb movement nor rb at all because this is a kind of powerup that I wanted to float around, being immaterial but for the player.