Frame is not tweening properly?

My frame (grey box in middle) tweens twice or something. I have no clue why. If you watch the video, you can see how it tweens to one place and then tweens again to the actual place I want it to tween. I want it to tween to 0.5,0.5. (frame’s anchor point is 0.5,0.5), so essentially the middle of the screen, but it tweens a bit extra, then goes into the correct place.

Anyone know why?

Here is the script:

local PpositionShift = Tween:Create(paladinConfFrame, TweenInfo.new(5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0,0.5, 0)})

while true do
	wait(0.01)
	if pValue.Value == true then
		print("now playing paladin tweens")
		paladinFrame.Visible = false
		paladinConfFrame.Visible = true
		bgPosition:Play()
		PpositionShift:Play()
		print("position tween")
		wait(3)
		paladinConfFrame.Visible = true
		paladinArrow.ImageTransparency = 1
		paladinArrowSel.ImageTransparency = 1
		break
	end
end

Thanks!

Yes, this is the intended behavior of Enum.EasingStyle.Back. It overshoots a little and then falls into place. Try using Enum.EasingStyle.Quad instead.

The other EasingStyles are listed here:
https://developer.roblox.com/en-us/api-reference/enum/EasingStyle

1 Like