So I want to make a simple animation but this button just doesn't cooperate.
The start screen: https://gyazo.com/34be4d4f575862700b001f0ddccf4b27
The start position of a button is: {0.5, -138},{0.6, -34}
Then the position the button should be after tweening: https://gyazo.com/568e9211b8bcb6b4f427f151b7992645
The position of it would be: {0.5, -138},{0.8, -34}
But it goes here: https://gyazo.com/6cef9c3128e3d4ba74edb55aa0f4f0a8
But the position is still: {0.5, -138},{0.8, -34}
The tween script of it is:
local Play = script.Parent.Main.Play local PlayStop =0.5, -138,0.8, -34 Play.Visible = true Play:TweenPosition(UDim2.new(PlayStop), 'Out', 1)
Why does this happen?
The first argument of a TweenPosition must be a UDim2 value, and not 4 seperate values. It also requires an EasingDirection, and an EasingStyle.
local Play = script.Parent.Main.Play local PlayStop =UDim2.new(0.5, -138,0.8, -34) Play.Visible = true Play:TweenPosition(PlayStop, Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 1, false) --EndPosition, Direction, Style, Time, Override
I'm not exactly sure, but try this:
local Play = script.Parent.Main.Play local PlayStop =0.5, -138,0.8, -34 Play.Visible = true Play:TweenPosition(UDim2.new(PlayStop), 'In', 1)