BCE0019 transform not a member of Object error only in Android build

had some code working in a pc build. I switched to android build and got error.
Using this code above function Update()(JS):

var Block1;	   
Block1 = GameObject.FindWithTag("Block1").transform; 
var Block1Placement : Quaternion;

then in Update() i have this code that the error returns for:

Block1Placement = Block1.transform.rotation;  

I have looked for solutions to no avail. I feel it is because of sloppy code but am at a loss. Any suggestions?

My entire page of code is not that long so can post it if needed.

This is mainly because you removed the pragma strict from the top of your script.

The actual reason is that your Block1 variable doesn’t have a type so it’s typed as “object”. Just give it the right type:

var Block1 : Transform;
Block1 = GameObject.FindWithTag("Block1").transform;
var Block1Placement : Quaternion;

Also since Block1 is already a Transform there’s no need for writing .transform again:

Block1Placement = Block1.rotation;