script.Parent.Touched:Connect(function(Hit)
if Hit and Hit.Parent and Hit.Parent:FindFirstChild("Humanoid") then
Hit.Parent.Health = 0
end
end)
COMMUNITY QUESTION
The kill script is not working and have written it correctly?
1 answer
try this:
script.Parent.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") then
Hit.Parent.Humanoid.Health = 0
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Because Hit.Parent would be the Character model of the player which is just a regular model and Health is not a property of the model so do Hit.Parent.Humanoid.Health = 0 that will work. All characters have a humanoid in it which has a lot of properties here are the properties of the humanoid https://developer.roblox.com/en-us/api-reference/class/Humanoid. The developer wiki can teach you a lot.