hi everyone i have a problem in this script. i making a time system script with two different collider one is for the finish line the other is for pause the time. how do i put two different colliders in one script?
pause time:
function OnCollision (hit : Collider)
{
Debug.Log(“collision”);
if(hit.tag == “clock”)
{
//Race is finished
isPaused = true;
}
}
finishline:
function OnTriggerEnter(other : Collider)
{
//var otherScript : ScoreScript = GetComponent(ScoreScript);
// If you have no other triggers,
// you can ignore the tag check.
if (!enabled || other.tag != "finishline")
return;
if (++score >= goal)
Win();
}
Cool please upvote and mark as answer if this solved your question.
– Meltdown