Sound plays when clicking part?

This is really wired, it should work are you sure that you can hear the sound coming from your PC? have you preview the sound?

Because I tested it and its work: AlarmButtonPart.rbxm (3.4 KB)

its cuz it should be
script.Parent.ClickDetector.MouseClick:Connect(function)
not
script.Parent.MouseClick

it littraly works for me . . .

I just found it the error the time you said that.

hahaha yea i was like wait a min why is he only doing script.Parent

so whats the right script? (30 c)

This is the fixed one:

script.Parent.ClickDetector.MouseClick:connect(function()
script.Parent.Sound:Play() 
end)

are the locations still the same as before, all three inside the part and not in eachother?

Same as this: image

1 Like

This one is going to work I just realised that you didn’t define ClickDetector at all.

script.Parent.ClickDetector.MouseClick:Connect(function() 
     script.Parent.Alarm1.SoundId = "rbxassetid://2778386920"
     script.Parent.Alarm1:Play()
end)
5 Likes

i littraly said that xD took ya a while

We nearly all forgot to define ClickDetector

i did in my first script lol xx

image this error with @Trystanus his script, trying @ArticGamerTV icGamerTV now

Replace sound with Alarm1

script.Parent.ClickDetector.MouseClick:connect(function()
script.Parent.Alarm1:Play() 
end)
2 Likes

@ArticGamerTV 's script works!

1 Like

thanks to everyone for helping! took awhile lol

3 Likes

Its took too much time for this easy task.

3 Likes

any idea how to make a sound that has been activated by a click detector play for everyone within range of it not server wide ive been trying to figure it out for a while now

Put the sound in the part and not the script and edit the range in the sound settings.