Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a part play a sound when clicked?

I've been trying to make a lantern play a switch sound when it turns on in Roblox Studio, but it hasn't been working. I've tried many different scripts, ClickDetectors, etc, but none of it is working. I've been using this script along with a ClickDetector and a sound:

script.Parent.ClickDetector.MouseClick:Connect(function() game.Workspace.Sound:Play(Sound ID Goes Here)

end)

1 answer

Put the sound ID in the properties of the sound and remove the sound id in

game.Workspace.Sound:Play(Sound ID Goes Here)

This discussion is preserved as it was. New answers, comments, and votes are closed.