Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How do i prevent people not dying on the killbricks?

Asked by 17 days 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

1 answer

Log in to vote
0
Answered by 16 days 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 100 — 16d
Ad

Answer this question