Basic Ahh Script for killing when touch.
local killingBricks = script.Parent:GetChildren()
for i, killingBrick in ipairs(killingBricks) do
if killingBrick:IsA("BasePart") then
killingBrick.Touched:Connect(function(basePartTouched)
local humanoid = basePartTouched.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)
end
end
My question is, why when the character dies (humanoid.Health = 0) there's a little lag first?
When I lower its hp to 1, it doesn't lag, it only happens when it dies.