How to play a sound.

I don’t quite get what to do with the audio source and playing it with my script. I want it to play when the timer ends. Any idea?


Code.

Attached.

I don’t get it. Any help is appreciated! :smiling_face::slight_smile::smiling_face::slight_smile::smiling_face:

if (time <= 0) keeps being true every frame after a while.

So play() is called every frame, so you don’t get to hear it. Change your code so that Play() is called only once.

Ah, thank you so much! Now it plays every frame which sounds really funny but it worked!