When you play games, such as Flood Escape 2, Pet Escape, or many other games. You
might notice some moving screens, and you might wonder how do they work or what
do you need ot make it work. In this tutorial, we will teach you how to create
a moving screen.
You might know where it is created, if you don't, it is created in StarterGui.
StarterGui is a folder where you can make GUIs and place it on a screen. But
remember, it is not SurfaceGui stuff. It only works on Workspace, not on
StarterGui. These are the stuff you would need to create one. Also, remember
NOT to use the regular script. The regular script is only for Workspace. Use
the local script.
• ScreenGui (Screen that is used in StarterGUI)
• Local Script (To begin your moving screen)
• Frame (Decoration, or to begin your scripting)
Other Materials you may want:
• Imagelabel
• Imagebutton
• TextLabel
• Textbox
• Textbutton
• Many other you want.
! WARNING !
Don't start scripting, yet! You need to add your stuff first. Follow these
instructions before you begin scripting.
Step 1:
Make sure your ScreenGUI is in StarterGUI.
Step 2:
Add the Frame inside ScreenGUI, you should see a white frame. Then, decorate
it to however you want it to be.
Step 3:
Then, add anything you want to be inside. Remember to add your local script into
the frame.
Step 4:
Begin the coding script area. Choose the thing that you have inside.
script.Parent:TweenPosition(UDIm2.new(?,?,?,?))
wait(?)
script.Parent:TweenPosition(UDIm2.new(?,?,?,?))
wait(?)
1st line: Begins the moving, the frame would be hidden. This line will make
frame visible.
Remember to add a number on: ?
2nd line: Waits.
Remember to add a number on: ?
3rd line: Restarts the moving, it makes it hidden. This line will move it to
unreveal the frame. This can be used for any frame: Example
script.Parent.AAAAA:TweenPosition(UDIm2.new(0,0,0,0))
wait(3)
script.Parent.AAAAA:TweenPosition(UDIm2.new(0,0,0,250))
script.Parent.Screen:TweenPosition(UDIm2.new(0,0,0,100)
wait(5)
script.Parent.AAAAA:TweenPosition(UDIm2.new(1,0,0,0))
script.Parent.Screen:TweenPosition(UDIm2.new(0,0,-1,0))
Or it can be used all at once:
Example:
script.Parent.First:TweenPosition(UDIm2.new(0,0,0,0)))
script.Parent.Second:TweenPosition(UDIm2.new(0,10,0,100))
wait(5)
script.Parent.First:TweenPosition(UDIm2.new(1,0,0,0))
script.Parent.Second:TweenPosition(UDIm2.new(0,0,-1,0))
Also, you don't need to move everything. Since the things you want to add is
inside your frame, all you need to do is move your frame.
BUT MAKE SURE:
Your frame must be sized: 1,0,1,0
Here's a example of a frame only:
script.Parent:TweenPosition(UDIm2.new(0,0,0,0)) -- You did do this, but this moves the screens that you placed inside.
wait(3)
script.Parent:TweenPosition(UDIm2.new(0,0,-1,0))
Not only you can just move a frame, you can move a text inside of a frame, or
you don't need a frame!
script.Parent.Textlabel:TweenPosition(UDIm2.new(?,?,?,?))
wait(?)
script.Parent.Textlabel:TweenPosition(UDIm2.new(?,?,?,?))
wait(?)
This first code is supposed to be text only, but this next code will be text
inside a frame.
script.Parent.Frame:TweenPosition(UDIm2.new(?,?,?,?))
script.Parent.TextLabel:TweenPosition(UDIm2.new(?,?,?,?))
wait(?)
script.Parent.Frame:TweenPosition(UDIm2.new(?,?,?,?))
script.Parent.TextLabel:TweenPosition(UDIm2.new(?,?,?,?))
wait(?)
Again, remember to put numbers in the ? spot.
1 - A basic moving script