// Jimmy Vegas Unity Tutorials // This Script is for coin collection using System.Collections; using System.Collections.Generic; using UnityEngine; public class CollectCoin : MonoBehaviour { public AudioSource coinFX; void OnTriggerEnter(Collider other) { coinFX.Play(); this.gameObject.SetActive(false); } } using System.Collections; using System.Collections.Generic; using UnityEngine; public class RotateObject : MonoBehaviour { public int rotateSpeed = 1; void Update() { transform.Rotate(0, rotateSpeed, 0, Space.World); } }