- Home /
Script that stops other script from working
Hello, Please I need Help.
I wrote this script that enables player from placing more mines after using four.
var controlScript : MineD;
var gos: GameObject[];
function Update ()
{
gos = GameObject.FindGameObjectWithTagmine;
if(gos.length > 4)
{
script = GetComponent(MineD);
script.enabled=false;
}
}
But it is not working, can somebody help me?
Thanks
Comment
Try gos = GameObject.FindGameObjectWithTag("$$anonymous$$ine");
Please don't use the word "it is not working", be more specific:
Compilation/Runtime Error
Nothing happen at all when the game runs
Unexpected Behaviour
Your answer
Follow this Question
Related Questions
How do i disable a script from a different script? 5 Answers
Cant set default var value to script? 1 Answer
Why won't values show in inspector or print in console? 1 Answer
set a var to a function in another script 2 Answers
custom variable type? 1 Answer