Chance based damage script not working

I’ve created a script that looks for a part called “KillBrick” when this part is touched the player would have a 1 in 5 chance of taking damage.

I’ve tried experimenting around and it seems to not work (doesn’t kill the player), and I’m unsure of what exactly is the problem since I get no errors from it.

I’ve tried changing the chance and have looked over the code but I don’t see any issues with it.

(this script is within the ServerScriptService)

local Humanoid = game.Workspace.KillBlock.Parent:FindFirstChild("Humanoid")
local killChance = math.random(1,5)

game.Workspace.KillBlock.Touched:Connect(function(kill)
	if Humanoid and killChance == 1 then
		Humanoid.Health = 10000
		wait(3)
		Humanoid.Health = 300
	else 
		print("Fail!")
	end
end)

My bad, try this :

game.Workspace.KillBlock.Touched:Connect(function(kill)
	if kill.Parent:FindFirstChild("Humanoid") then
		local killChance = math.random(1,5)
		if killChance == 1  then
			kill.Parent:FindFirstChild("Humanoid").MaxHealth = 10000
			kill.Parent:FindFirstChild("Humanoid").Health = 10000
			task.wait(3)
			kill.Parent:FindFirstChild("Humanoid").MaxHealth = 300
			kill.Parent:FindFirstChild("Humanoid").Health = 300
		else
			print("fail!")
		end
	end
end)