1

# How do I make a brick that plays a sound effect every time you touch it?

I've tried putting the soundID into a brick then touching it but it doesn't play sound effects. I've also tried adding a different sound inside the brick and sure enough it doesn't work. What do you think I should do ?

0
Put the code that you've tried in your post, then maybe we can see what the problem is infalliblelemon 145 — 7y

0

I found this that could help you out. It kills and gives a sound but you can just remove the kill and change the sound; function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") local sound = script.Parent.Bowser

if (humanoid ~= nil) then humanoid.Health = 0 sound:play(1)

end end

script.Parent.Touched:connect(onTouch)

0
Sorry the code mest up when I submitted it. MrLimitless 0 — 7y
0

I haven't tried this before but this might look like this:

local part = game.Workspace.Part

function onTouched()
part.Sound:play() -- put the sound on the part for this to work
wait(5)
part.Sound:Stop()
end

part.Touched:connect(onTouched)