I'm making a gui that will go up and down but the second Tween is not working the problem is at the comment --here is the problem
local object = script.Parent.Parent.Frame
object.AnchorPoint = Vector2.new(0.023, 0.593)
object.Position = UDim2.new(0.023, 0, 0.638, 0)
local button = script.Parent
local Open = false
local Text = script.Parent.Parent.TextLabel
Text.AnchorPoint = Vector2.new(0.023, 0.593)
Text.Position = UDim2.new(0.024, 0, 0.64, 0)
---------------------------------------------------------------
button.MouseEnter:Connect(function(x, y)
object:TweenSize(
UDim2.new(0, 9, 0, 46),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.3,
true
)
end)
button.MouseLeave:Connect(function(x, y)
object:TweenSize(
UDim2.new(0, 4, 0, 46),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.3,
true
)
end)
----------------------------------------------------------------
--here is the problem
function leftMouseButtonUp(x, y)
if Open == false then
Open = true
Text.BackgroundColor3 = Color3.new(0.356863, 1, 0.0823529)
Text:TweenPosition(
UDim2.new(0.024, 0, 0.63, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.2,
false
)
wait(0.1)
Text.BackgroundColor3 = Color3.new(0.356863, 1, 0.0823529)
Text:TweenPosition(
UDim2.new(0.024, 0, 0.64, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.2,
false
)
else
print("hi")
end
end
script.Parent.MouseButton1Up:Connect(leftMouseButtonUp)
