This video will show you how to make a kill brick and damage brick in Roblox Studio.
Kill Script:
script.Parent.Touched:connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end
end)
Damage Script:
script.Parent.Touched:connect(function(hit)
if debounce == false then
debounce = true
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
end
wait(Interval)
debounce = false
end
end)