I am trying to make a script that damages the player if he falls too hard,but when the Touch event is fired,the velocity of the player has already changed. It would really help me if there were like,i don't know, BindToTouch or BindToChange event in objects,unfortunally,there isn't.
Here is the script that i made
left=script.Parent:WaitForChild'LeftFoot'
right=script.Parent:WaitForChild'RightFoot'
humanoid=script.Parent:WaitForChild'Humanoid'
function touch()
if last<-64 then
script.Parent.Humanoid:TakeDamage((math.ceil(script.Parent.LowerTorso.Velocity.y/-4)))
end
end
left.Touched:connect(touch)
right.Touched:connect(touch)

1 comment
Why not make a CanCollide false part above the ground do this?