I'm really new to scripting and I'm just barely learning onClicked functions. I want to make a part that when it gets clicked, it plays a sound. I don't want the sound to be played to the entire server though. How would I do this?
part = script.Parent sound = script.Parent.Sound
function onClicked() sound:Play()
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
This should work also you must inset ClickDetector and Sound into the part. FYI this is not a very hard thing to look for next time you should look else where.