I want the script to damage the player on touch every five seconds, but it damages the player repeatedly without waiting one second.
function onTouch(part)
local human = part.Parent:findFirstChild("Humanoid")
if (human == nil) then return end -- if it is not a humanoid, then do nothing, otherwise...
human.Health = human.Health - 5 -- then kill the humanoid
wait(1)
end
script.Parent.Touched:connect(onTouch)

2 comments
Use debouce(if else).
Event performs the function without waiting for the end of the function. You must create debounce variable and specify " if else"