I am trying to make a small animation for a cardstack being shuffled with javaFX and I reset the positions of the images before every animation. I do this by calling img.setLayoutX and img.setLayoutY. When I run it for the first time, it runs just fine and the positions are the ones they should be. When I run it the second time however, the cards move at total different positions although the LayoutX and LayoutY as well as the normal X and Y positions dont change. Can someone help? Thanks in advance