This is my script, it says
“Assets/Scripts/RespawnMenu.js(23,28): BCE0077: It is not possible to invoke an expression of type ‘UnityEngine.Rect’.”
#pragma strict
var LookAround01 : MouseLook;
var LookAround02 : MouseLook;
var charMotor : CharacterMotor;
var sprintScript : SprintAndCrouch;
function Start ()
{
LookAround01 = gameObject.GetComponent(MouseLook);
LookAround01 = GameObject.Find("MainCamera").GetComponent(MouseLook);
charMotor = gameObject.GetComponent(CharacterMotor);
sprintScript = gameObject.GetComponent(SprintAndCrouch);
}
function Update ()
{
}
function OnGUI ()
{
if (GUI.Button)Rect(Screen.width*0.5-50, 200-20, 100, 40)("Respwan");
{
//RespawnPlayer();
}
}
Please Help!