[SOLVED] How to get text input from user and store in a variable

sure

https://playcanvas.com/project/767583/overview/explosive-battle-royale

I don’t see anything wrong. Can you try to load a different scene?

ok

Same error

I see what is the problem. Your variable self is not defined in the second setTimeout. An alternative for your ‘self solution’ is the way below.

    setTimeout(function(){
        this.loadScene('TEST');
    }.bind(this), 1);
1 Like

It Worked Thank You

1 Like

is there anyway I could do this in an actual text box instead of a prompt?

Hi @WilliamBoersma31! Maybe the topic below can help you.

https://forum.playcanvas.com/t/playcanvas-ui-components