fps window

hello, i just started with a scripting course and i’m making a basic game right now, i wanted to make a window that shows your fps so you can check if your computer is running fast enough so i googled it.

i copied this script and it sais i have to use a guitext or it won’t work and since i am a complete noob since i just started scripting:how do i get this script in the form of a gui.box on my screen?

You would just put it in a GUI Label.

if( timeleft <= 0.0 )
{
   // guiText.text = "" + (accum/frames).ToString("f2");

   //that line becomes

    GUI.Label(myRect,"" + (accum/frames).ToString("f2"));
}

You also have to omit the line that turns off the script if no gui text is there.

You can use this one instead.