Question by
Nanousis · Oct 14, 2015 at 07:48 PM ·
if-statement
Hello i want some help with my lap manager.
I have made this script i dont rly know whats wrong with it . BTW i am not a rly good dev so pls help if possible #pragma strict
float laps : 1f;
var player : GameObject ;
function OnTriggerEnter(otherObj: Collider){
if (otherObj.tag == "Player"){
laps ++;
}
}
if ( laps >=3f){
player = new GameObject ("Player");
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612041318im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
If statement executes, even when its false again 2 Answers
Keeps running else statement even though it shouldn't 1 Answer
if statement not runing when it should (Fixed) 2 Answers
If/else statement is always else 1 Answer
How to remove a game object and replace it with a different one when all objects are gone 1 Answer