Error with accessing transform.position (C#)

Hello.

I have a problem with this code:



if (Transform.position.x > 12)
Transform.position.x = 12;


At this point i get next error:

error CS0120: An object reference is required to access non-static member `UnityEngine.Transform.position’

How to solve this? Thanks for help

By calling Transform and not transform you are referencing the Transform class and not the instance property… use transform (lowercase) instead.