Hey everyone, I’m working on a cutscene (there’s no game, just a cutscene) and I keep running into an error that reads “can’t add script behavior TMP_CoroutineTween. The script needs to derive from MonoBehaviour.” At the bottom of the screen is a message that says there’s an unexpected symbol in my code. This is my first time coding so I am at a huge loss and any help would be very much appreciated. Thank you!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour {
public GameObject Cam1;
public GameObject Cam2;
public GameObject Cam3;
public GameObject Cam4;
public GameObject Cam5;
void Start() (
{
StartCoroutine(TheSequence());
}
IEnumerator TheSequence()
{
yield return new WaitForSeconds(4);
Cam2.SetActive(true);
Cam1.SetActive(false);
yield return new WaitForSeconds(4);
Cam3.SetActive(true);
Cam2.SetActive(false);
yield return new WaitForSeconds(4);
Cam4.SetActive(true);
Cam3.SetActive(false);
yield return new WaitForSeconds(4);
Cam5.SetActive(true);
Cam4.SetActive(false);
}
}