generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Roblox » Help (Technical Support and Account Issues)
Home Search
 

Re: Making a Button Play Sound?

Previous Thread :: Next Thread 
gorbunovd is not online. gorbunovd
Joined: 10 Feb 2012
Total Posts: 21
06 Jun 2014 01:35 AM
I was making a test in # Studio to see if I can make a ######### Play an audio clip on click. So far I watched a few YouTube Tutorials on how to make a button. But there is no tutorial on how to make a button play sound. This is what I have so far with ###########

EXPLORER

###############


#######################################


#############

local Button = script.Parent

function #########
Game.#########.##########

end
end

Button.##################################



Is my code good? I tried to test it in Solo Mode but the button did not play the audio. Please reply to this forum post with information on how to solve this problem. Am I missing something in this Forum Post? PM me for more information on this.

Thanks! ^.^
Report Abuse
Septamology is not online. Septamology
Joined: 20 Jun 2013
Total Posts: 2811
06 Jun 2014 01:49 AM
Your Under 12 filter makes me able to read none of the code u just said.

but i will provide instructions anyway

1. Insert a part into Workspace and then put a clickdetector inside it.
2. Put a script into the part
3. Put this into the script vv

function click()
local songlength = 0 -- change 0 to the length of your song
local musicid = 0 -- change 0 to the ID of the song (just the numbers ok)
enabled = true
if enabled == true then
enabled = false
a = Instance.new("Sound")
a.Parent = game.Workspace
a.SoundId = musicid
a:Play()
wait(songlength)
a:remove()
enabled = true
end

script.Parent.ClickDetector.MouseClick:connect(onClick)




hope dis helps :D



Report Abuse
gorbunovd is not online. gorbunovd
Joined: 10 Feb 2012
Total Posts: 21
06 Jun 2014 01:54 AM
Thanks!
Report Abuse
Septamology is not online. Septamology
Joined: 20 Jun 2013
Total Posts: 2811
06 Jun 2014 01:55 AM
no problem :D
Report Abuse
gorbunovd is not online. gorbunovd
Joined: 10 Feb 2012
Total Posts: 21
06 Jun 2014 01:58 AM
Although I was hoping for the actual method when using a .#.U.I. Button. Sorry if it blocks the # out in #.U.I.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » Help (Technical Support and Account Issues)
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image