I am having trouble understanding what "hit"s parent is.
function Touched(hit) local kill = hit.Parent local humanoid = kill:FindFirstChildWhichIsA("Humanoid") if humanoid then humanoid.Health = 0 end end script.Parent.Touched:Connect(Touched)
The function :Touched() returns the OBJECT that touched the part. However, it doesn't returns a MODEL. So when a player's character touches the part, the :Touched() function will return a PART of the character. It will not return in character, because the character is a model. At the line 2 of the script you have wrote gets the player's character into a variable (the hit part's parent). But we don't know if the hit part's parent is a character of a player. Since every player's character has a child named humanoid, we can find out if it's a player's character or not. At line 3 you got the child named "humanoid" of the character into a variable. Then, at line 4, you used a if statement that verifies if the variable at line 3 EXISTS. If it exists, it's a player's character. Then, at line 5 you set the humanoid's health to 0. Hope this helped!