Why isnt my tween working?

Hello @LuckyPlanetsAlt1.
You have got a good idea, UDim2 is for tweeing the position of a UI or GUI interface.
For example, moving a frame or image around the screen, I am glad you have spotted this and used a LocalScript as well!

However the issues are you have got your TweenInfo inside your tween.

Essentially to set up a default tween you would first make a variable and declare the information you would like the tween to use. An example is below:

local TweenInf = TweenInfo.new(1, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 2)

TweenInfo contains:
(Time, EasingStyle, EasingDirection, RepeatCount, Reverses, DelayTime)

  • Time is the time it takes for the tween to complete
  • Easing style there is a documentation on that.
  • Easing direction, which is the direction it tweens something.
  • Repeat count, which is the number of times you would like it to repeat, in your case it is set up to repeat twice. (2 times)
  • Reverses, which is either true or false (or you can leave it blank for false), where true means it will do the opposite or inverse of the inital tween information, for example, this is useful if you want to do something, then go back to the original state.
  • Delay Time, this is just a fancy way of adding a delay to a tween before playing it, it is essentially like putting task.wait(1) before running the tween (if your delay time is set to 1)

Here is the documentations example of how to make a tween:

local TweenService = game:GetService("TweenService")

local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Color = Color3.new(1, 0, 0)
part.Anchored = true
part.Parent = game.Workspace

local goal = {}
goal.Position = Vector3.new(10, 10, 0)
goal.Color = Color3.new(0, 1, 0)

local tweenInfo = TweenInfo.new(5)

local tween = TweenService:Create(part, tweenInfo, goal)

tween:Play()

With some slight alterations I will provide you with this:

local TweenService = game:GetService("TweenService")

local goal = {}
goal.UDim2.new(0.275, 0, 0.294, 0)

local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 2)

local tween = TweenService:Create(Inventory, tweenInfo, goal)

tween:Play()

Try adding this to your script and getting it to work how you would like it, if this works, check my answer as a solution so other people don’t come flooding in with suggestions, make sure you look into the documentations I have provided to make sure you understand why we are doing what we are doing. Good luck, LuckyPlanetsAlt1!

check if the udim2 vals are correct

he literally just has a typo on lined 6.

UDim2.new,(0.275,0,0,0.294,0)
         ^                   ^ 
needs to be moved to the end ^

change line 6 to: UDim2.new(0.275,0,0,0.294,0),

Move the comma on line 6 to the end of the line.

image