How do I get sound to play from a script?

I have a sound in SoundService called “Alarm” and I want to play it one time.

I used this script:

print("Sound played")
game:GetService("SoundService").Alarm:Play()

It printed out “Sound played” but it didn’t play the sound. How do I make it play the sound?

You should’ve put sound into workspace if you want to play it for everyone and into part or any physical object if you want to be attached to centrain position

1 Like

It worked, but what is the purpose of sound service if you can’t activate sounds from scripts in there?

There is several functions that could get use, you can read about it here