I want if I click on my object it to change tags in both ways but only does on one way.
I want both Respawn-> Player and the opposite but it can only go one way- if it switches to Player it can't go back to Respawn
Script:
using UnityEngine;
using System.Collections;
void OnMouseDown()
{
if (gameObject.tag == "Player")
{
gameObject.tag = "Respawn";
}
}
↧