BCE0077 - Scrolling Textures

Hi, I’m trying to make the texture on a cube scroll to the side and I keep on getting error BCE0077 - idk how good my script is but if you have any alternatives or can find the problems in it then please comment!!! Thanks so much.

var scrollSpeed = 0.90;
var scrollSpeed2 = 0.90;

function Start () {

}

function Update () {

}

function FixedUpdate() {

var offset = Time.time * scrollSpeed;
var offset2 = Time.time * scrollSpeed2;
GetComponent.<Renderer>().material.mainTextureOffset = Vector2;

}

You get the mainTextureOffset variable of the material to the Vector2 type, this is what is leading ot the BCE0077 error. The variable is looking for a fully qualified type. If the variable offset is the x axis and offset2 is the y axis then you should modify your script to use this variables as the Vector2.

GetComponent.<Renderer>().material.mainTextureOffset = Vector2(offset, offset2);

You can see this same implement ion on the mainTextureOffset documentation page with the code set to JS in the upper right corner.