Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i prevent people not dying on the killbricks?

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

✓ Accepted answer

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)

1 comment

0

I hope this was helpful

This discussion is preserved as it was. New answers, comments, and votes are closed.