After clicking play, new GUI pops up

Hello, so I have a main menu for my game, and when you click play the gui leave the screen and a plain gui covers the screen for a second then you can play. I need help finding out how I would make a new set of GUI once the screen goes by the screen after pressing play. Here is what I have for the Menu GUI:


image

The Transition frame is the part that crosses the screen after clicking play.

I need it so when the transition frame crosses the screen a new set of GUI pops up on the players screen.

If you know the length of the white screen transition, you can divide the length by 2 to get the midway point. From there, you could use a task.delay(timeout) to swap the old screen with the new screen in a seamless way

1 Like

this is the script that makes the transition. If the transition is only wait(1) how would I know how long it is?

The screen transition overlay is a white frame that tweens in and out of transparency right? And then reveals the new frame?

So the transition frame is hidden off on the side of the screen. And when you click play it moves across the screen. I will provide a video.

robloxapp-20230215-1541296.wmv (583.5 KB)

yeah, so if you know how long the total transition animation length is, you can divide it by 2. So then you get the time that the transition frame is perfectly in the middle of the screen hiding everything. Then from there you swap the old UI for the new UI and it should be a clean transition

Alright. But the only issue is, I have no idea on how to do anything you said in the second and third sentence.

I timed it and it takes 3 seconds exactly which would mean the middle time is 1.5 seconds.

yeah, so at 1.5 seconds you swap the UI

How exactly do I swap the old UI to the new UI?

How do I do this exactly with the UI?

You could change its Enabled property

1 Like

I can see where you are going with this, but I have no idea on how to code it.

I was just wondering if you are still currently helping me?

do this when you use tween:

script.Parent:TweenPosition(Udim2.new(0, 0, 0 ,0),"InOut","Quad",0.2)

Which script would I insert this in, and what is the 0.2?

for example, here’s the remade script.

also, the 0.2 is how fast the tween is.

script.Parent.Parent.Parent:TweenPosition(UDim2.new(0.401, 0,1, 0),"InOut","Quad",1)

– that’s the first tween. Do kind of what I did on the other tweens.

Also, Dont do cameratype custom, do scriptable if you’re scripting it.

Insert it anywhere you would like that makes ‘script.Parent.Parent.Parent’ work along with the others.