goix
|
  |
| Joined: 28 Sep 2009 |
| Total Posts: 20 |
|
|
| 16 Dec 2014 06:01 PM |
So i have been around on roblox for a very long time, but i never learned how to script. Now i am currently trying to challenge myself to make a working piano. But the main issue is trying to get a block to make a sound when you either click it, or press a button. If anyone knows how to do this and can help, i would be glad to hear it.
-goix |
|
|
| Report Abuse |
|
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 16 Dec 2014 06:02 PM |
It's possible and easy, but I'd start with something else
however if you want, store audio in the part, make it disabled or whatever, and when you click do script.Parent.AUDIONAME:Play() |
|
|
| Report Abuse |
|
|
|
| 16 Dec 2014 06:02 PM |
Add a sound into the brick, and a click detector.
local function OnClick() script.SoundNamehere:Play() wait() end PartNameHere.ClickDetector.MouseClick:connect(OnClick) |
|
|
| Report Abuse |
|
|
goix
|
  |
| Joined: 28 Sep 2009 |
| Total Posts: 20 |
|
|
| 16 Dec 2014 06:07 PM |
| Thank you for those who replied, i will try that <3 |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 16 Dec 2014 06:16 PM |
| a piano? thats a lot of sounds to get and organize |
|
|
| Report Abuse |
|
|
|
| 16 Dec 2014 06:18 PM |
I think there's a way to just use one sound with the Pitch property.
--ThatChristianGuy |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 16 Dec 2014 06:21 PM |
| still take forever to tune them properly |
|
|
| Report Abuse |
|
|