New to Unity, how do I make this work?

This currently does nothing.
I am going to have it give a typing effect to a Textlabel thing in my UI

var Title = “When they Scream”;

for (i = 0; i < Title.length; i++) {
var test = Title.substring(0, i);
Debug.Log(test);
WaitForSeconds(.2);
}

Before I try to help, let me make sure that I’m understanding the situation correctly… You’re essentially trying to get one letter at a time to pop up with a 0.2 second pause between them? Try this…

#pragma strict

var Title = "When they Scream";

function Start()
{
    TypeText();
}

function TypeText()
{
    for (var i = 0; i <= Title.length; i++)
    {
        var test = Title.Substring(0, i);
        Debug.Log(test);
        yield WaitForSeconds(0.2);
    }
}

Tested, works for me :wink: