Hello. I am currently scripting some death traps for my game. I know there are two ways of doing this. Take a look at this code
script.Parent.Touched:Connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum then hit.Parent:BreakJoints() end end)
and this
script.Parent.Touched:Connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum then hum.Health = 0 end end)
I understand that the first one breaks the joints in the player’s character, thus killing it and that the second one goes to the humanoid and sets the health to zero.
However, I want to understand which one is more efficient. Can any of you guys help me?
I mean, there really isn’t any way of making a “Kill Script” more better which is the thing, you just need to know how you’d wanna kill the player depending on the way you wanna do it