I want to make a brick that simply prints the names of the people who touched it. The catch being once a person touches it the brick can't print ONLY their name for let's say 5 seconds. So I don't think this would use a debounce unless I could make a debounce turn on and off for individual players. I know this is somewhat asking for a script, but I really need an example to go off of and turn into something useful. :(
local isTouched = false
local x = script.Parent
x.Touched:Connect(function(a)
if not isTouched then -- Debounce
isTouched = true
for i,v in pairs(game.Players:GetChildren()) do
print(v.Name)
wait(5)
isTouched = false
end
end
end)
This script prints all players in the game and I just want the ones who touched it to get a debounce.

1 comment
Could you please add some code showing that you have attempted this?