So I am trying to tween a GUI. I looked at some tutorials and they did not make sense to me or were outdated. Not requesting anything just need to know what it is. Thanks for reading!
Just write the UDim2 value that you want it to move to and the movement direction, style and time taken moving. example:
script.Parent:TweenPosition(UDim2.new(0,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5)
This makes the GuiObject move to the corner in while being faster at the beginning and slower in the end (EasingDirection.Out), makes it move in a linear fashion (EasingStyle.Linear), and does that all in 0.5 seconds. You don't need to write the starting place because it automatically moves to the place you want it in the required time. For more info and easing properties (to make it move in a different style) check out the dev hub's article on tweening: Tweening Article
Hi,
in my example, I use a TextLabel object, which I put in StarterGUI -> ScreenGUI and make it invisible for startup. Later I call this in a local script:
local coinBubble = player.PlayerGui.ScreenGui.PointLabel:Clone()
coinBubble.Parent = player.PlayerGui.ScreenGui
coinBubble.Visible = true
coinBubble:TweenSizeAndPosition(UDim2.new(0.4, 0, 0.4, 0), UDim2.new(0.5, 0, 0.5, 0))
wait(0.7)
coinBubble:Destroy()
So, I clone the Textlabel, make the current players ScreenGUI its parent, tween it and after while destroy it again.