How to unlock door - using key?

Hello,
i;m trying to make my first game in unity,
so my question maybe is silly but i need help :
I have one door - gate, and i want when my player collect the “key” - another object in my game - with tag “key”
the rotation of my gate to me (0,90,0). X,Y, Z axis.
So i create my “key” - and also my gate.
On my player i have this code:

but i still cannot rotate my gate. =(
thank you

Did you try doing

gameObject.Find("key").transform.rotation = Vector3(0, 90, 0);

Notice the spelling error on Finf in the code posted above.

Also… rotation is a Quaternion, you cannot try to fill it with a Vector3… Replace Vector3(0,90, 0) with Quaternion.Euler(0,90,0)