Need Coding Help

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);
    }
}

Change void Start() ( to void Start() - i.e. remove the second open parenthesis.

Alright, that definitely seems better, thanks for the advice. I don’t know why I put it there but hey. The unexpected symbol message is resolved but the first one still remains. Any idea what that’s about?

Hey, I fixed it, little bit of your help and a little troubleshooting. Thanks for looking over my code, everything is running smoothly now and I’m happy as a clam to have made my first cutscene. Thanks again my friend

1 Like