local Players = game.Players
local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
local Gui = PlayerGui:WaitForChild("ScreenGui")
local Img = Gui.Img
local START_POSITION = UDim2.new(0, 0, 0, 0)
local GOAL_POSITION = UDim2.new(1, 0, 1, 0)
Img.Position = START_POSITION
Img:TweenPosition(
GOAL_POSITION, -- Final position the tween should reach
Enum.EasingDirection.In, -- Direction of the easing
Enum.EasingStyle.Exponential, -- Kind of easing to apply
5 -- Duration of the tween in seconds
)
Test changing Enum.EasingStyle also to Circular (9) and Cubic (10)
Expected Behavior
The tween animation should work
Actual Behavior
The tween animation only works for Enum.EasingStyle from 0 to 7.
Issue Area: Engine Issue Type: Other Impact: High Frequency: Constantly
Try using game.Tweenservice and TweenInfo.new(), despite the fact that tweenservice is commonly used on parts, it can be used on UIs as well. so try something like this
local Img = game.Players.LocalPlayer.PlayerGui.Gui.Img
Img.Position = UDim2.new(0,0,0,0)
local tweenInfo = TweenInfo.new(
5,
Enum.EasingStyle.Exponential,
Enum.EasingDirection.In
)
game.TweenService:Create(Img,tweenInfo,{Position = UDim2(1,0,1,0)}):Play()
There was a bug report for this issue before, and they likely won’t be fixed. You’re supposed to use TweenService instead of TweenPosition and TweenSize, which works with these EasingStyles.