local Players = game:GetService(“Players”):GetChildren() function Choose() return Players [math.random(1,#Players)] end function AnnihilateRandom() local Player = Choose() local Hp = Player.Character.Humanoid.Health if Hp.Value >= 1 and Player.Name ~= "Ziffix" then Player.Character.Head:Destroy() else AnnihilateRandom() end end end while wait(1.5) do AnnihilateRandom() end
cant find any errors, does anyone know the problem?
I'm pretty sure that the Players service is their client and whatnot, while their physical bodies are in the workspace.
local Players = game:GetService(“Players”):GetChildren() function Choose() return Players[math.random(1,#Players)] - was a space here. Not sure if it matters. end function AnnihilateRandom() local Player = Choose() local Hp = Player.Character.Humanoid.Health if Hp.Value >= 1 and Player.Name ~= "Ziffix" then Player.Character.Head:Destroy() else AnnihilateRandom() end end end while wait(1.5) do AnnihilateRandom() end
Everything else should be fine. You probably don't see anything because your name isn't "Ziffix".