Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I can't find the error at all in this TweenPosition script. Can someone help me identify the issue?

Asked by 4 years ago
Edited 4 years ago

I keep getting this message "Out is not a valid member of UDim2" when I use this code:

script.Parent.Parent.Shop.CloseShopButton:TweenPosition(UDim2.new(1.15,-210,1,-60), "Out", "Linear", 0.5)

I copy and pasted the TweenPosition thing from another script that worked, with the exact some positions and everything, and there was no change. My references work too, I need help to find what the error is. "Out" Is usually always supposed to work like that.

1 answer

Log in to vote
0
Answered by 4 years ago

First off I would use the Enums instead of strings so "Out" is an Enum Direction and "Linear" is an Enum style. It appears that this is what is causing the error as it can't use strings.

script.Parent.Parent.Shop.CloseShopButton:TweenPosition(UDim2.new(1.15,-210,1,-60), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5)
0
Well, it worked, but all my other tweenings use strings and they all work. Oh well. IceBoltGamingIBG 9 — 4y
Ad

Answer this question