Quantcast

How do i make a sound when a button is pressed?

There is something in the instructions about making a sound when a button is pressed. Can someone tell me how to use it?

Custom sounds?

*insert part here*.Touched:connect(function()
 local Sound = *insert sound here*
 Sound.Playing = true
 script.Disabled = true
 end)

Yes, this does disable the script so it would be better if you make another script that can be used for the button.

Or you can use Sound from the explorer and then name it _Sound#(Number of the button that you want let it play when pressed) and put it in one of the path that you want to make sound effect.

Your script is not reliable with .Touched firing multiple times and disabling scripts won’t do anything either. It’s called using button functions

@Blue_Time2

Lib.btnFuncs[3] = function() -- Lib.btnFuncs[3] fires When button 3 is pressed, change ‘3’ to the button number
    Lib.Map.SoundName:Play()
end

lol okay, I don’t even script on FE2 so
actual scripting for the win

Lol! Win win

2 Likes

win win for the
win win
how did that actually make sense

ye ikr Lol

1 Like

Am I the only one who inserts a sound instance into the button and then rename it to
_Sound#
Instead of using scripts

1 Like

Same.

i do that too.

1 Like

yeah i know that but how do you make a custom sound play?

Yes, im trying to make it play a certain sound after a button has been activated

  1. Find Audios in your Toolbox in Studio.
  2. Select a Sound Effect.
  3. Drag the Sound Effect to the Part that will Fall in 3 seconds (_Delay).
  4. Name the title of the sound _Sound (Number Here), and add a stringvalue and name it _Delay, and put its Value to 3 to match the fall.

You can use this:
https://web.roblox.com/library/158712406/Wood-Breaking