Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why wont this script kill players?

local hum=game.Players:GetPlayers()game.Players.NumPlayers.Character:FindFirstChild("Humanoid")
	if hum then
		hum.Health = 0
		end

This piece of code wont kill players

local hum is supposed to be on one line but it wont fit.

2 comments

0

Well the local variable is real confusing, you want it to get the players then get the number of players, you have this garbage in there, do you want it to just kill everyone?

0

Use the output sometimes, Rabid. It's very useful for detecting most syntactical errors.

1 answer

Instead of the hum.health, maybe try moving the hum.Parent.Head up 1 stud on the Y axis. If the player's head or torso are dislocated from it's body, it dies.

This discussion is preserved as it was. New answers, comments, and votes are closed.