I want to activate and deactivate the object but it gives me error timeline
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class TextoComprado : MonoBehaviour {
public GameObject AvisoComprado;
public void AvisoCompra () {
AvisoComprado.SetActive ( true );
WaitForSeconds(2);
AvisoComprado.SetActive ( false );
}