hey, i realy neeed help with this, my player is not moving after respawning,the game is playing, what can I do.
private var dead = false;
var health = 100;
var damage = 10;
function OnControllerColliderHit(hit : ControllerColliderHit)
{
if (hit.gameObject.tag == "fallout")
{
dead = true;
}
if (hit.gameObject.tag == "bullet" )
{
health -= 10;
}
if (health < 1 )
{
dead = true;
}
}
function Update()
{
if (dead)
health = 100;
transform.position = Vector3(-9,2,-48);
dead = false;
}
dude you are awesome thank you
– thenachotech1113