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)
Put the sound ID in the properties of the sound and remove the sound id in
game.Workspace.Sound:Play(Sound ID Goes Here)