I have this tweening script but it doesn’t work. I’ve added comments if that helps! Thanks for helping!
Snippet of code
SettingButton.MouseButton1Down:Connect(function()
local FrameX = SettingFrame.Position.X
local FrameY = SettingFrame.Position.Y
local Up = -370 -- Do not change
local tween = ts:Create(SettingFrame, info, {Position = UDim2.new(FrameX.Scale, FrameX.Offset, FrameY.Scale, FrameY.Offset == Up)}) -- This doesn't work
SettingFrame.Visible = true
tween:Play()
tween.Completed:Connect(function()
SettingFrame.ExitButton.Visible = true
end)
end)
SettingFrame.ExitButton.MouseButton1Down:Connect(function()
local FrameX = SettingFrame.Position.X
local FrameY = SettingFrame.Position.Y
SettingFrame.ExitButton.Visible = false
local tween = ts:Create(SettingFrame, info, {Position = UDim2.new(FrameX.Scale, FrameX.Offset, FrameY.Scale, FrameY.Offset == 0)}) -- this works but why it doesn't work with negatives?
tween:Play()
end)
BackButton.Visible = false
PlayButton.MouseButton1Down:Connect(function()
if Settings["Gui Position Tweens"] then
for i, Buttons in pairs(MainFrame:GetChildren()) do
if Buttons:IsA("TextButton") or Buttons:IsA("ImageButton") then
local ButtonPosX = Buttons.Position.X
local ButtonPosY = Buttons.Position.Y
UILISTLAYOUT.Parent = Gui.Parent
local Animate = Num --Don't change
local tween = ts:Create(Buttons, info, {Position = UDim2.new(Buttons.Position.X.Scale, ButtonPosX.Offset - Animate, Buttons.Position.Y.Scale, ButtonPosY.Offset)}) -- Replace - with + if you want the button to go right or - to go left
tween:Play()
tween.Completed:Connect(function()
MainFrame.Visible = false
BackButton.Visible = true
end)
end
end
else
MainFrame.Visible = false
end
end)