Quantcast
Channel: Latest Questions by Raxer
Viewing all articles
Browse latest Browse all 6

audio.Play Help :S

$
0
0
I have been at this for hours and I am really confused about what the problem is. I have a rigidbody that I want to meow when it hits a certain object. Now this rigidbody also has a point value on it, and my script for adding points works perfectly. So I am not sure why it is not playing the sound. I have tried all sorts of variations of different kind of scripts. Have moved around audio source and script between the rigidbody and the other object. But no sound. var meow : AudioClip; function OnTriggerEnter(hit : Collider){ if(hit.gameObject.tag == "Player"){ audio.PlayOneShot(meow); ScoreSystem.myScore += 1; Destroy(gameObject,0.0); } Please help :) Thanks

Viewing all articles
Browse latest Browse all 6

Trending Articles