//Jimmy Vegas Unity Tutorial //This script is for your cutscene using System.Collections; using System.Collections.Generic; using UnityEngine; public class CutsceneIntro : MonoBehaviour { public GameObject thePlayer; public GameObject cutsceneCam; public int randomNum; void OnTriggerEnter(Collider other) { this.gameObject.GetComponent().enabled = false; randomNum = Random.Range(0, 2); cutsceneCam.SetActive(true); if(randomNum == 0) { cutsceneCam.GetComponent().Play("VillageACam1"); } if (randomNum == 1) { cutsceneCam.GetComponent().Play("VillageACam2"); } thePlayer.SetActive(false); StartCoroutine(EndingCutscene()); } IEnumerator EndingCutscene() { yield return new WaitForSeconds(10); thePlayer.SetActive(true); cutsceneCam.SetActive(false); } }