0

# How do i prevent people not dying on the killbricks?

Asked by 10 months ago

I have a lot of kill bricks and use this code: script.Parent.Touched:connect(function(hit) if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Health = 0 end end) but the thing is some people can keep jumping on them and somehow survive. I don't know how to prevent them from doing it

0
Answered by 10 months ago

When you want to type a script, click the blue Lua button

It might have been a glitch or a slow reaction, you might be able to stop it using loops

(Put this in the killbrick)

script.Parent.Touched:Connect(function(hit)
repeat
hit.Parent.Humanoid.Health = 0
wait(0.001)
until hit.Parent.Humanoid.Health == 0
end)

0
I hope this was helpful NathanBlox_Studios 212 — 10mo