change level, when I enter in a temple, but I need to kill all the turrets in the way,
if I don’t kill, the temple don’t works.
which script should I use or how I write in he?
and I try to make the script, it is right?
what have I done wrong?
You can’t just copy-paste a line of code and expect it to work.
What are you doing wrong?
There’s no such variable as “hit” as far as I can see.
Since this line appears to be copy-pasted from another tutorial you probably don’t have a level named “Worm_World_Map_1” either. Is there an object which has the “Worm” tag? Is the “Worm” tag declared?
I’m going to repeat my statement from another of your threads: Start by learning basic programming before you jump right into a high-quality 3D game engine.
You need to understand the code you’re handling to make things work.
if (hit.gameObject.tag == “worm”) Application.LoadLevel(“yourLevelName”)
A boolean value?
if (hit gameObject.tag == “worm”) Application.LoadLevel(“yourLevelName”)
Are you trying “hit” to be a function or detection?
It’s hard to know what’s going on in your code, but these might fix the sintax errors you’re getting.