What should be a better way to kill a player?

So basically I am working at a fighting game but I’ve wondered what would be the best way to kill a player (Needing to do it for whenever the round needs to end).

I’ve been testing somethings and I want to know which of those would be better.

Humanoid:TakeDamage(Humanoid.Health)
Humanoid.Health = 0

And another question is if this one would work:
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, true)

1 Like

Humanoid:TakeDamage will not damage humanoids that are protected with a force field. By setting the Health property directly you can bypass this. Not sure why you would want to use

regularly to kill a player. No need to reinvent the wheel. If you need to account for forcefields, use Humanoid:TakeDamage. If not, just Humanoid.Health = 0.

Edit: you probably should use Humanoid:TakeDamage to damage a humanoid but not necessarily kill it. That is kind of the whole point of it.

2 Likes

Instant kill, I would use:

humanoid.Health = 0

If you want to gradually take the players health away, I would use:

 humanoid:TakeDamage(10) 

Providing that the value, 10, can be your desired value.

4 Likes