Problem after 5 seconds destroy/deactivate component

I Have a problem…
73372-problem.png

I need to now how i deactivate this| gameobject.addcomponet(); after 5 seconds.
I can´t fix that problem, pls Help!

@BelsonsanPT you could use a coroutine to accomplish this. This code is untested so let me know if it doesn’t run.

using UnityEngine;
using System.Collections;

public class PowerUp2X : MonoBehaviour
{
    public GameObject Player;

    void OnCollisionEnter2D(Collision2D col)
    {
        if(col.gameObject.name == "PowerUp")
        {
            Player.AddComponent<TapToMove>();
            StartCoroutine(RemovePowerup(5.0f));
        }
    }

    IEnumerator RemovePowerup(float WaitTime)
    {
        yield return new WaitForSeconds(WaitTime);
        Player.RemoveComponent<TapToMove>();
    }
}