Help with "UI:TweenPosition()" Function

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

1 Like

Try using another EasingStyle, Cubic is broken apparently (maybe file a bug report for this)

I tried the quad one but that was the same. I will still try it again or the other ones when im on PC though, thanks.

Try using TweenService and tell me if it works.

Yep, this worked. Thank you. I’ll try to file a bug report.

I just used this but with another easing style, apparently cubic is broken.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.