In some games, they have different musics for when you go to a certain area, or if you touch a certain block. How do they do that? -- In other words, how do you make a block play/change the music when you touch it?
COMMUNITY QUESTION
Make an audio be executed when you touch/go through a block?
1 answer
All you need is the sound in the brick and enter this code:
script.Parent.Touched:connect(function() -- Brick gets touched and triggers a function
script.Parent.Sound:Play()--Plays the sound
end) --Done.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
This worked for me! Thanks!