Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

how would I make a sound play for everyone if a certain dialog choice was picked?

Asked by 6 years ago
Edited 6 years ago

How would I make a sound play for everyone if a certain dialog choice was picked?

-would it be a local script or a normal script?

0
shouldn't matter unless you want the sound client sided, in that case i think a LocalScript is for you fanofpixels 718 — 6y

2 answers

Log in to vote
0
Answered by
Leamir 3138 Moderation Voter Community Moderator
6 years ago
Edited 6 years ago

Helo, Innovation_dev!

you should call this function when the player clicks on the dialog:

-- Normal Server Script(not local script)
local song

function PlaySound(songid)
    song = Instance.new("Sound")
    song.SoundId = "rbxassetid://" .. songid
    song.MaxDistance = 10000000
    song:Play()
    wait(song.TimeLength)
    song:Destroy()
end

Don't forget to call the function and place the sound id on the brackets!

Good Luck with your games!

0
Thank you! :) Innovation_dev 2 — 6y
0
Accept my answer if it helped =D Leamir 3138 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Depends whether or not you only want the person who is having the dialog to hear it.

0
I do, I want everyone to hear the sound. Innovation_dev 2 — 6y

Answer this question