For this script, touching a specific brick here would play a noise, however I've noticed that you can touch this brick repeatedly and it will simply repeat the soundid from the very beginning which is very janky and abusable.
script.Parent.Touched:connect(function(part)
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
if plr then
script.Parent.Sound:Play()
end
end)
I was thinking of simply putting a delay in the script using wait() after the first use but the script doesn't seem to work
script.Parent.Touched:connect(function(part)
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
if plr then
script.Parent.Sound:Play()
local play = script.Parent.Sound:Play()
if play then wait(15)
end
end
end
Help would be much appreciated!

1 comment
thank you for the detailed response and explanation, very helpful :)