Hello there, I wanna tween a frame UI position, but with the following script, I get an unusual behaviour.(Video link below the script)
The script:
local ButtonsFrame = script.Parent.Parent.Parent.ButtonsFrame
local TweenTime = 1
function ButtonsTween(Boolean)
if Boolean == true then
ButtonsFrame.Visible = true
ButtonsFrame:TweenPosition(
UDim2.new(0.01,0,0.15,0),
Enum.EasingDirection.In,
Enum.EasingStyle.Cubic,
TweenTime
)
else
ButtonsFrame:TweenPosition(
UDim2.new(0.01,0,0.01,0),
Enum.EasingDirection.In,
Enum.EasingStyle.Cubic,
TweenTime
)
task.wait(TweenTime)
ButtonsFrame.Visible = false
end
end
Video of the problem: https://gyazo.com/18dbe85cfc23ac0674e9daa6f589e8ba