When you click on a part, I wanna know how to make a sound play when you click it.
✓ ANSWER ACCEPTED
How do I make a sound play when a button is pushed?
2 answers
✓ Accepted answer
Hello, this isn't a request site but this is probably your first question, i suggest you try solving the answer first. Ok i will help you solve your question:
Local Sound = workspace.Sound --Let say your Sound is in Workspace and it is named Sound
script.Parent.MouseClick:Connect(function() -- The click detector is clicked, it fire this function (Put clickDetector inside your button and this script inside click Detector
Sound:Play() -- Play the sound
end)
Hope that solved your question, remember that this isn't a request site :D
Upload ur sound to workspace and name it Sound
play
Local Sound = game.workspace.Sound
script.Parent.MouseClick:Connect(function()
Sound:Play()
end)
stop
Local Sound = game.workspace.Sound
script.Parent.MouseClick:Connect(function()
Sound:Stop()
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
