local victims = game.Players:GetPlayers()``
script.Parent.MouseButton1Click:Connect(function()
for i, victims in pairs(victims) do
local char = victims.Character
local humanoid = char:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
end)
I think the "for i, victims in pairs(victims) do" is the broken part, because as soon as I tried to print something it didn't work. Thank you all!

2 comments
Btw this is a button to kill everyone in the server.
On line 3 throughout the whole for loop you are overwriting the victims variable. So I recommend you change it to for i, victim