I try to move my player to start point and reduce life when it fall. But that print("Dead") func call twice before it move to start position. So once the player fall, it reduce two life and print "Dead" twice in Output. Please tell me if there is anything wrong with my code.
if transform.origin.y < -5:
transform.origin = Vector3(0,4,0)
life =- 1