This is a really simple thing but I need help. I've no example this time, but I need to know if it goes in a LocalScript or Script, its parent, and what's contained in the script.
If you had provided an example, this would be a lot easier to answer. Have you tried anything yet?
Anyway, here goes nothing.
I haven't tried LocalScripts before for a kill brick, so I'd just say to keep it a script.
I'd write a connection line first.
script.Parent.Touched:connect(function(hit)
Your function doesn't have to be named hit, but it's convenient.
So, then you need to find the humanoid. The following would be incorrect:
local humanoid = hit:FindFirstChild("Humanoid")
Because no part of your character will include a humanoid. Therefore, you need to check the parent.
local humanoid = hit.Parent:FindFirstChild("Humanoid")
then you can set the health to 0 like such:
humanoid.Health = 0
That leaves the script as this:
script.Parent.Touched:connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") humanoid.Health = 0 end)
I hope this answered your question sufficiently.