local t=false
script.Parent.Touched:connect(function(c)
if game.Players:GetPlayerFromCharacter(c.Parent)then
local p=game.Players:GetPlayerFromCharacter(c.Parent)
if c.Name=="Head"and t==false then
t=true
wait(15)
repeat wait(1)c.Parent.Humanoid.Health=c.Parent.Humanoid.Health-5 until TouchEnded(game.workspace.ocean (c.Name=="Head"))--this line may be causing the problem
end
end
end)
coroutine.resume(coroutine.create(function()
script.Parent.TouchedEnded:connect(function()
t=false
end)
end
))
It only damages me one time, and if i jump out of the water then jump back in, i don't take any more damage.
Any help is great, thanks. |