Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to enable audio when touched part?

Asked by
Andrwo 0
9 years ago

For example, if there is a part, and a player touches it, and the whole server hears the audio (music ID) Thank you!

1 answer

Log in to vote
-1
Answered by 9 years ago

Put the Sound instance in workspace

function onTouched(hit)


game.workspace.sound:Play()  --Its finding the "Sound" in workspace and making it play.


end

script.Parent.Touched:connect(onTouched)
0
Thank you very much! Andrwo 0 — 9y
0
No problem. MessorAdmin 598 — 9y
Ad

Answer this question