local HurtPlayer = coroutine.create(function()
local Death = math.random(1,2)
while true do
wait(1.5)
-- stuff
if Death == 1 then
if playerTable[randomPlayer].Character.Humanoid.Health <= 10 then
coroutine.yield()
end
end
playerTable[randomPlayer].Character.Humanoid.Died:Connect(function()
print('Humanoid Died')
coroutine.yield()
end)
end
end)
I've tried disconnecting, breaking, returning, etc and I can't find a solution. It's inside of the coroutine but it won't yield.
