At the end of verse 24 there is a break from the main story line as the John tells us how this event fulfills Scriture. (See: [[rc://en/ta/man/translate/writing-background]])
"and they also took his tunic." The soldiers kept the tunic separate and did not divide it. AT: "they kept his tunic separate" (See: [[rc://en/ta/man/translate/figs-explicit]])
# let us cast lots for it to decide whose it will be
The soldiers will gamble and the winner will receive the shirt. AT: "let us gamble for the tunic and the winner will get to keep it" (See: [[rc://en/ta/man/translate/figs-explicit]])
# so that the scripture would be fulfilled which said
You can translate this in an active form. AT: "This fulfilled the scripture that said" or "This happened to make the scripture come true which said"