How do I make sure the player is visually seeing a GUI right when they join the game

How do I make sure the player is visually seeing a GUI right when they join the game

The Problem:

So what I’m trying to achieve is making it so that when the player joins they experience a black screen (GUI). After that, a GUI animation should trigger. To show my precision, I want the black screen to be visible right after this screen (picture below) will fade out (or before it fades out if possible). I know I can just have it enabled in the properties tab before starting the game but then how will I know when to trigger the GUI animation.

But yeah I really don’t exactly know when to play the GUI animation, I’m not sure when this screen is gone or if I will be playing the animation too late (after it’s been gone for a while). Maybe after the character has loaded?? I’m not sure.

What I need:

What the player should see at the start should be a black screen (from a GUI) and NOT just their character and the world (due to the GUI not loading or not being triggered at the correct time). And after that the GUI animation should play.

just adding this message here so my post gets put back at the top

use

game.ReplicatedFirst:RemoveDefaultLoadingScreen()

then wait until the player’s character loads (player.characteradded) – I’m not sure if this is the exact timing that you want

then play your animation

Should I use :Connect() or :Wait() for the characteradded function??

What if I don’t want to make a function using :Connect() and just use :Wait(), I heard :Wait() method wasn’t the most efficient and can break at times, what if I wrap it in a pcall? will that fix the problem?

Or should I use :Connect() as my approach

Check if player.character already exists then use player.characteradded:Wait() if it doesn’t, otherwise you can just load it

How do you prefer I do this bit? Doesn’t characteradded:Wait() already take care of the problem, or am I just misreading the post?

if the character loaded before the function characteradded:Wait(), the function will run after the character is reloaded again (this just causes glitches and problems)

it’s because characteradded:Wait() waits until a new character is made without checking if the player character already exists

ah I see, thank you so much! Looks like everything is resolved then.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.