As seen below, my code is made to tween an object through a function that basically just tweens the specified object, its position, style and time.
I also print the final position that it tweens to and add whole round numbers but in return I still get not exact numbers as seen below:
for i,v in pairs(self.Frame.List:GetChildren()) do
local newpostX = UDim2.new(v.Position.X) - UDim2.new(0.35)
GuiSuperClass:TweenObject(v, newpostX.X, v.Position.Y, Enum.EasingStyle.Linear, 0.1)
print(newpostX.X, v.Name)
if newpostX == UDim2.new(0.5,0,0,0) then
GuiSuperClass:TweenSize(v, 0.33, 0.88, Enum.EasingStyle.Linear, 0.1)
else
GuiSuperClass:TweenSize(v, 0.3, 0.8, Enum.EasingStyle.Linear, 0.1)
end
end
The script basically should add 0.35 in offset value to a variable that will be set as the frame’s next X offset value