No errors, just need help to prevent player's death if player's velocity is 0
script.Parent.Touched:connect(function(p)
local hum = p.Parent:FindFirstChild('Humanoid')
if (hum ~= nil) and p.Parent.Torso.Velocity.magnitude > 0 then
hum.Health = 0
elseif hum ~= nil and p.Parent.Torso.Velocity.magnitude < 0 then
print('Safe')
end
end)
