Detecting when the user firsts opens a UI?

I want to show a bunch of logs on an debug terminal I am working on, and I want to print into the console all the background information that is running when they first open it; I don’t want it to happen when they haven’t opened yet since I have an typewriting animation is there an event that tells you when it is first opened or something?

Well it depends on how you are opening your UI. I guess the easiest way is to see when the the UI is enabled or a frame becomes visible. You might be able to use a .Changed event for that, or even simpler, just have it in the local script for that UI and see if it opened yet or not.

1 Like

I am using userinputservice with the keycode K

Ok. Have a variable, hasBeenOpened, in your local script set to false. The first time you open it, which is when you detect the K key pressed, set it to true so you know it’s now been opened for the first time.

How do you make the terminal visible? Does the player click on it, touch a part, or what?

You should probably provide the script(s) involved to provide us with some context.