Limit rotation for a statue puzzle

Hello everyone, I’m trying to make a puzzle level in my game , with buttons that activate the rotation of a statue , here is the code

var Statue : GameObject;

float MinClamp1 = 0;
float MaxClamp1 = 90;
float MinClamp1 = 90;
float MaxClamp1 = 180;
float MinClamp1 = 180;
float MaxClamp1 = 270;
float MinClamp1 = 270;
float MaxClamp1 = 360;

function Update () {
if (Statue.transform.rotation.y > 360){
Statue.transform.rotation.y = 0;
}

}

function OnTriggerStay()
{
  Statue.transform.rotation.y =        Vector3(Mathf.Clamp(Statue.transform.rotation.eulerAngles.y, MinClamp1, MaxClamp1),0,0);
}

But it doesn’t work , I’ve got a console error message

Assets/MesAssets/MesScripts/TriggerStatueRotation.js(3,6): UCE0001: ‘;’ expected. Insert a semicolon at the end.

Please ! What should I do ? :frowning:

  1. properly declare your float variables (you can't use C# syntax in JS)
  2. re-title your question so people know you're trying to solve a specific error, not a logic problem (at least at the moment)

Proper JS declarations would look like:

var MinClamp1 : float = 0f;

or

var MinClamp1 = 0f;    //or ... = 0.0