Hey so I just started scripting yesturday and I can make kill bricks now but I was wondering if a specific part of your body touches the kill brick then you die instead of the whole humanoid touching it. Here's my code so far:
local function onTouched(player)
local humanoid = player.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
script.Parent.Touched:Connect(onTouched)

1 comment
Thanks for the help!