Your player script is getting called before the ladder script and it's in the wrong order. Is that what is happening?
You might be able to create a function in the ladder script, that the player script calls that will update the position of the ladder. Then get the position of ladder.