My script makes a NPC say something when a proximity prompt is run, but I want a debounce. I am not too familiar with debounces, but I feel like I could use some help.
I know I could use HoldDuration, but that could break upcoming scripts that may be added.
This is my current script:
local Chat = game:GetService("Chat")
local messages = {
"Welcome to Bloxy Mart!",
"Hello and welcome to Bloxy Mart!",
"Salutations, welcome to Bloxy Mart!",
"Having a fine day? Welcome to Bloxy Mart!"
}
script.Parent.Triggered:Connect(function(playerWhoTriggered)
Chat:Chat(script.Parent.Parent.Parent.Head, messages[math.random(#messages)])
end)
Any help to add a debounce? If so please answer this question. Thank you!

2 comments
https://developer.roblox.com/en-us/articles/Debounce.
If you're not going to use "playerWhoTriggered", then I suggest removing the parameter.