I write (javascript):
if (myobject.gameObject.CompareTag(“Player”))
myobject.GetComponent(myscript).variablex=5;
And I get the following error in the console:
Unknown identifier ‘myscript’
myobject is correctly defined and of course the myscript script is attached to myobject gameobject…