For some reason, the if statement works, but then the TweenSizeAndPosition doesn't run, but the Visible Part does. Does anyone know why the TweenSizeAndPosition doesn't run?
Code:
elseif script.Parent.Parent.ResetStage.Visible == true then
script.Parent.Parent.ResetStage:TweenSizeAndPosition(
UDim2.new(2.993, 0,0.75, 0),
UDim2.new(4.568, 0,0.122, 0),
Enum.EasingDirection.In,
Enum.EasingStyle.Sine,
1,
true
)
wait(1)
script.Parent.Parent.ResetStage.Visible = false
end
This is the Whole Script:
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.StageShop.Visible == true then
script.Parent.Parent.OpenStageShop.Visible = true
script.Parent.Parent.CloseStageShop.Visible = false
script.Parent.Parent.StageShop:TweenSizeAndPosition(
UDim2.new(0.156, 0,0.035, 0),
UDim2.new(0.403, 0,0.037, 0),
"In",
"Sine",
1,
true
)
wait(1)
script.Parent.Parent.StageShop.Visible = false
elseif script.Parent.Parent.ResetStage.Visible == true then
script.Parent.Parent.ResetStage:TweenSizeAndPosition(
UDim2.new(2.993, 0,0.75, 0),
UDim2.new(4.568, 0,0.122, 0),
Enum.EasingDirection.In,
Enum.EasingStyle.Sine,
1,
true
)
wait(1)
script.Parent.Parent.ResetStage.Visible = false
end
script.Parent.Visible = false
script.Parent.Parent.OpenMenu.Visible = true
script.Parent.Parent:TweenPosition(
UDim2.new(-0.095, 0,0.22, 0),
"In",
"Sine",
1,
true
)
end)

4 comments
What is ResetStage, a GUI object? Frame? It does work, it's likely that your frame is off the screen or in some unexpected position. Also the tween is quite wild, just saying.
its a Frame
Can we see your whole code? If you have elseif statement, there is likely something before it. The gui is enabled right?
ok, ill add the whole script