I am trying to use this script that is supposed to re
set my character controller to the spawn point when it touches a plane but yet this script is having compiling errors when i try to put it on the controller.
specifically these lines
" function LateUpdate();
{
if(dead)
{
transform.position = Vector3(0,0,0);"
This is the script
private var dead = false;
function OnControllerColliderHit(hit : ControllerColliderHit) {
if(hit.gameObject.tag == “Floor”)
{
dead = true;
}
function LateUpdate()
{
if(dead)
{
transform.position = Vector3(1510.397,597.7795,1255.543);
gameObject.Find(“Main Camera”).transform.position = Vector3(1510.397,597.7795,1255.543);
dead = false;
}
}
any help with this out be greatly appreciated