Greetings,
I am attempting to tween my GUI back and forth depending on the click of a button (if button is pressed tween back, if back then tween forward.) Right now my code does nothing and I do not understand why.
Here is the code I have:
local StatsButton = script.Parent
local StatsFrame = script.Parent.StatsFrame.StatFrame
local OrangeFrame = script.Parent.StatsFrame.Orange
local LightOrangeFrame = script.Parent.StatsFrame.LightOrange
StatsButton.MouseButton1Up:Connect(function()
if StatsFrame.Position == UDim2.new(0.781,0,0.527,0)
then
StatsFrame:TweenPosition(UDim2.new(1,0,0.527,0),"Out","Quint",1,false)
elseif StatsFrame.Position == UDim2.new(1,0,0.527,0)
then
StatsFrame:TweenPosition(UDim2.new(0.781,0,0.527,0),"In","Quint",1,true)
end
end)