How to I make a part to kill

How do I make a part that when a player touches it then it will kill them

tons of resources on this, How to Make a KILL BRICK in 1 MINUTE! | Beginner Roblox Scripting Tutorial (2022) - YouTube

1 Like
script.Parent.Touched:Connect(function(hit) 
 if hit.Parent:FindFirstChildOfClass("Humanoid") then
  hit.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(hit.Parent:FindFirstChildOfClass("Humanoid").Health)
 end
end)