my game is so lag

i dont know what happened but my game turned so lag, whenever i load my game. first was main menu wont work. my main menu texts contains this scripts ex.“START GAME” (hover script and the script to load the game ex. application.loadlevel(1):wink: but then when i click the “START GAME” i doesnt work, it just loop in the main menu again.

so i jumped into the game and the lag happened, and whenever i play the game skipping the main menu because of the loop my game lagged, so lag i cant even move my main player

please help

There are many sources of lag. If you weren’t before, put #pragma strict at the beginning of all your scripts, then deal with any errors that occur afterwards (without deleting the #pragma strict). This will force you to use static typing, which will make your scripts faster.

A very common one is graphics. Go here to find ways to solve these.

thanks for the help… i found the answer :smiley:
its in the health script, a nasty loop ( like Appication.LoadLevel(0) )