I'm trying to make an audio play when I click on a brick. Also, before I continue... It's a mesh, not a brick... will that make the codes change?
Anyways, I've tried to play around with ClickDetector and Sound ID's but I just can't seem to get it working.
I most likely need to add a script, but I have no idea what to put in it :(
Sorry I can't give more information of this. I am not very fluent with Lua yet...
Ok this needs alot pf preperation. So first you need a sound and in the sound put in http://www.roblox.com/asset/?id= (here put the sound id), and name the sound to something you will remember. And insert a part with a ClickDetector on it. You also need a localscript and put it in StarterGUI
This is what you put in the localscript!
x = game.Workspace.aaa -- Assuming aaa is the part y = game.Workspace.lll -- Asumming lll is the Sound function onClicked(mouse) wait(0.1) y:Stop() -- Make sure you stop all other sounds wait(2) y:Play() end x.ClickDetector.MouseClick:connect(onClicked)
You put the localscript in The starter GUI so everyone can hear it