if not bool then
local originalX = obj.Position.X.Scale
obj.Position = UDim2.new(-1,0,obj.Position.Y.Scale,0)
obj.Parent.Enabled = true
obj:TweenPosition(UDim2.new(originalX,0,obj.Position.Y.Scale,0),Enum.EasingDirection.Out,Enum.EasingStyle.Exponential,1,true)
wait(1)
else
local originalX = obj.Position.X.Scale
obj:TweenPosition(UDim2.new(2,0,obj.Position.Y.Scale,0),Enum.EasingDirection.Out,Enum.EasingStyle.Exponential,1,true)
wait(1)
obj.Parent.Enabled = false
obj.Position = UDim2.new(originalX,0,obj.Position.Y.Scale,0)
end
end
local function tempAchievements() -- temporary function to open up achievements gui
tempAchievementsButton.Activated:Connect(function()
guiManager(achievementsGUI.MainFrame,tempAchievementsButton.Parent.Parent.Enabled)
end)
end
My test case runs the else statement, but instead of it sliding off to the right of the screen, it just moves left a few pixels. Why is this happening?