Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

what is this gui tween thing and how do I do this?

Asked by
zValerian 108
5 years ago

So I see this in a bunch of games and I was wondering how do I do it. I am trying to make the gui pop out of nowhere and tween in but I don't even know what it's called. It looks like this:

https://gyazo.com/999cc9f34bdd77b57f2bee1d762be9dd

see like how the gui pops out of nowhere and leaves nowhere

2 answers

Log in to vote
0
Answered by
sheepposu 561 Moderation Voter
5 years ago
Edited 5 years ago

Here is an example of making a Gui slide from above. The GUI object's current position is (0.2, 0, -1, 0) Then if I do this it will slide down

1local guiObject = --Get GUI Object
2 
3guiOBject:TweenPosition(UDim2.new(0, 2, 0, 0.2, 0), 'Out', 'Quint') --There are also other customizations to this TweenPosition

Go here for more info - https://developer.roblox.com/en-us/api-reference/function/GuiObject/TweenPosition

0
Oops I guess I didnt refresh it to find out if someone else answered D: guywithapoo 81 — 5y
0
It's fine, now he/she has two answer they can learn from sheepposu 561 — 5y
0
sheepposu you need to add a number at the end EX: (UDim2.new(0, 2, 0, 0.2, 0), 'Out', 'Quint', ANumberHere) NeptyU 15 — 5y
0
No, I do it without the number. The default is already 1 sheepposu 561 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

I made something exactly like this a while back. I just copy and pasted the script that I created, so maybe you can break it down to figure it out? Here it is:

01local Menu = script.Parent.Parent:WaitForChild("Menu")
02local open = game.StarterGui.MenuGUI.Menu.Open.Value
03local Codes = script.Parent.Parent:WaitForChild("CodesMenu")
04local CashMenu = script.Parent.Parent:WaitForChild("CashMenu")
05local CashItems = script.Parent.Parent:WaitForChild("CashItems")
06local ShopMenu = script.Parent.Parent:WaitForChild("ShopMenu")
07local Particles = script.Parent.Parent:WaitForChild("Particles")
08local Items = script.Parent.Parent:WaitForChild("Items")
09enabled = true
10script.Parent.MouseButton1Click:connect(function()
11    if enabled == true then
12        enabled = false
13    if open == false then
14        Menu:TweenPosition(UDim2.new(0, 0,0, 300),"Out","Quint", 0.5)
15        open = true
View all 34 lines...

Sorry if it looks kind of messy, I'm not a very good scripter yet. I hope you can get something from this though!

Answer this question