I am trying to create an obstacle course, so I need a brick that instantly kills the player when it’s touched. In the example below the red brick is supposed to kill instantly, but if you hold jump you can avoid the kill. Does anybody know any better ways to do this?
function onTouched(h) local h = h.Parent:FindFirstChild("Humanoid") if h ~= nil then h.Health = 0 end end script.Parent.Touched:Connect(onTouched)
If you hold jump you can avoid being killed;