I want to make a brick that plays a sound when it is touched. It will be a door to a shop that rings a little bell when you touch the door. I think it has something to do with touch interest but I'm not sure! I also need it to be for everyone to hear not just me.
Thanks! :D
01 | function onTouch(part) |
02 | local humanoid = part.Parent:FindFirstChild( "Humanoid" ) |
03 | local sound = script.Parent.Bowser |
04 |
05 | if (humanoid ~ = nil ) then |
06 | sound:play( 1 ) |
07 |
08 | end |
09 | end |
10 |
11 | script.Parent.Touched:connect(onTouch) |