Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a brick play a sound when it is touched?

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

1 answer


function onTouch(part) 
local humanoid = part.Parent:FindFirstChild("Humanoid")
local sound = script.Parent.Bowser

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

end 
end

script.Parent.Touched:connect(onTouch)

This discussion is preserved as it was. New answers, comments, and votes are closed.