Function = function()
			local randomPlayer = math.random(1,#game.Players:GetChildren())
			local playerTable = game.Players:GetChildren()
			local DoJump = coroutine.create(function()
				while true do
					local plr = playerTable[randomPlayer]
					plr.Character.Humanoid.Jump = true
					plr.Character.Humanoid.Died:Connect(function()
						print('Humanoid Died')
						coroutine.yield()
					end)
					
					wait(math.random(1,5))
				end
			end)
			coroutine.resume(DoJump)
		end

I have this function here which makes a player jump repeatedly. However, I can't seem to make the coroutine yield, why?