For the kill block I have if you touch it quickly it will not kill you and you can continue the obby without dying and going back to the beginning of the stage
I tried making it so the script will put the player’s health at -500 instead of 0 but that still did not work
local Debounce = false -- debounce for touch event
local Damage = 25 -- how much damage the humanoid will take
local WaitInbetweenDamge = 1 --how many seconds between each damage
script.Parent.Touched:Connect(function(part) -- reference the part that is touched
local Player = game.Players:GetPlayerFromCharacter(part)
if Player then -- if the part is a player's character then
if Debounce == false then
Debounce = true
part.Parent.Humanoid:TakeDamage(Damage)
wait(WaitInbetweenDamge)
Debounce = false
end
end
end)
ok the kill block I was using was a free model and I cant catch errors like that because I dont know how to script and look up a tutorial for every thing