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
10 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 10 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 — 10y
0
No problem. MessorAdmin 598 — 10y
Ad

Answer this question