TweenPosition... broken?

So I’m trying to make a Tween animation using GUI built in tween functions. One of them was TweenPosition, it works. But the EasingStyle always defaults to Linear even when I have something is written like Elastic or Bounce.

I tried creating a TweenService to see if I could avoid this problem but… its not working, the code isn’t working. I’m hoping someone very smart could explain this complicated problem to my little brain.

PS: I can’t write a topic in Studio Bug.

local enterInfo = TweenInfo.new(1,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
local clickTween = TweenService:Create(inputClicker,enterInfo,{Size = UDim2.new(0.25,0,0.25,0)})
local storeTween = TweenService:Create(inputClicker,enterInfo,{Position = UDim2.new(0.5,0,0.5,0)})

local function enter(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		menu.Visible = true
		inputClicker.Size = UDim2.new(0,1,0,1)
		inputClicker.Position = UDim2.new(0.5,0,0.5,0)
		store.Position = UDim2.new(0.16,0,1.3,0)
		clickTween:Play()
		store:TweenPosition(UDim2.new(0.16,0,0.65,0,Enum.EasingDirection.Out,Enum.EasingStyle.Exponential,0.25)) -- The problem
	end
end

menu.InputBegan:Connect(enter)

Did you try writing Enum.EasingStyle.Elastic instead of "Elastic"?

Its most likely a problem with your code, and not a studio bug, if you give your code then we may be able to help you out.

Yes that’s what I have written down.

Could you post your code? It’s more likely an issue with that as @WaterJamesPlough said.

I posted it now, you should be able to see my edit

Should be there now since I edited the code…

I don’t know if you haven’t seen your output console, but it should print this out. You have put all the properties in the brackets of the UDim2.new() constructor, whereas it should be like this:

store:TweenPosition(UDim2.new(0.16,0,0.65,0), Enum.EasingDirection.Out, Enum.EasingStyle.Exponential,0.25)
2 Likes

Try replacing

store:TweenPosition(UDim2.new(0.16,0,0.65,0,Enum.EasingDirection.Out,Enum.EasingStyle.Exponential,0.25))

with

store:TweenPosition(UDim2.new(0.16,0,0.65,0),Enum.EasingDirection.Out,Enum.EasingStyle.Exponential,0.25)

Exponential is not an easing style as far as I’m aware, and your closed parentheses for the UDim2.new() constructor was in the wrong position.

Edit: Nevermind! I guess I didn’t get the memo that Exponential, Cubic, and Circular have been added as styles.

2 Likes

Just wanted to add, Exponential is an easing style, as on the API page

2 Likes

o.O I feel like a complete idiot. Thanks!

1 Like