Log in to vote

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

Asked by 1 year ago
Edited 1 year ago

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)


1 answer

Log in to vote
Answered by 1 year ago

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

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

Answer this question