develofied
(develofied)
February 15, 2023, 8:22pm
#1
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:
The Transition frame is the part that crosses the screen after clicking play.
develofied
(develofied)
February 15, 2023, 8:23pm
#2
I need it so when the transition frame crosses the screen a new set of GUI pops up on the players screen.
DataSigh
(DataSigh)
February 15, 2023, 8:33pm
#3
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
develofied
(develofied)
February 15, 2023, 8:38pm
#4
this is the script that makes the transition. If the transition is only wait(1) how would I know how long it is?
DataSigh
(DataSigh)
February 15, 2023, 8:39pm
#5
The screen transition overlay is a white frame that tweens in and out of transparency right? And then reveals the new frame?
develofied
(develofied)
February 15, 2023, 8:41pm
#6
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.
develofied
(develofied)
February 15, 2023, 8:42pm
#7
DataSigh
(DataSigh)
February 15, 2023, 8:42pm
#8
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
develofied
(develofied)
February 15, 2023, 8:44pm
#9
Alright. But the only issue is, I have no idea on how to do anything you said in the second and third sentence.
develofied
(develofied)
February 15, 2023, 8:45pm
#10
I timed it and it takes 3 seconds exactly which would mean the middle time is 1.5 seconds.
DataSigh
(DataSigh)
February 15, 2023, 8:46pm
#11
yeah, so at 1.5 seconds you swap the UI
develofied
(develofied)
February 15, 2023, 8:46pm
#12
How exactly do I swap the old UI to the new UI?
develofied
(develofied)
February 15, 2023, 8:49pm
#13
How do I do this exactly with the UI?
DataSigh
(DataSigh)
February 15, 2023, 8:51pm
#14
You could change its Enabled property
1 Like
develofied
(develofied)
February 15, 2023, 8:51pm
#15
I can see where you are going with this, but I have no idea on how to code it.
develofied
(develofied)
February 15, 2023, 9:01pm
#16
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)
develofied
(develofied)
February 15, 2023, 9:12pm
#18
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.