What are you trying to store? That is a conditional, are you trying to store the boolean result in some other variable you haven’t mentioned?
And your last two lines don’t make sense, how can it be declared where the script will use it but not where it exists? Either way it sounds like you have a scope issue.
(also, don’t directly compare floats (ie, position.z) they’re not going to match, especially if one is derived by the physics system)
TacoNinja, if you type obj.gameObject.transform.position.z , i assume obj already is a Transform… so write obj.gameObject.transform.position.z is equal to obj.position.z . It was just a comment.
About your problem, as Sycle said, i don’t understand a word.
If you speak spanish, feel free to write in your languaje: i’m from Argentina (i will translate).