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 ?
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)
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)
Try reading something about the sound:
http://wiki.roblox.com/index.php?title=RBX.lua.Sound_(Object)
The wiki says that sound requires a preload for it to work. Try reading something about preload too:
http://wiki.roblox.com/index.php?title=Preload
Hope that helps!