Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- songarea = Resources.Load ("Song Name") as AudioClip;
- function OnTriggerEnter (other : Collider)
- {
- {
- if (other.gameObject.tag == "Player")
- {
- Song = object.GetComponent<AudioSource>();
- Song.clip = songarea
- Song.Play();
- }
- }
- }
- @script RequireComponent(AudioSource)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement