Im trying to make a death brick but when I step on it nothing happens, here's the code:
local lava = game.Workspace.Lava
fuction OnTouch(Lava)
local human = lava.parent:FindFirstChild("Humanoid")
if human ~= nil then
human.MaxHealth = 0
end
end
script.parent.touched:Connect(function(Ontouch))
and could someone also explain to me why there needs to be two ends?

4 comments
Thank you! I fixed the errors but my character still doesn't die when touching the brick.
Did you change MaxHealth to Health?
yup
I fixed it