I'm trying to tween a Frame. However, when I was testing it only the button changed and the Frame did not move. Is there a problem in the script below? (This is a local script)
local frame = game.StarterGui.FrameGui.Frame
local button = script.Parent
local toggle = false
script.Parent.MouseButton1Click:connect(function()
if toggle == false then
toggle = true
frame:TweenPosition(UDim2.new(0.25,-50,0.4,-50),'Out','Quad',1)
script.Parent.Text = 'Close Shop'
else
toggle = false
frame:TweenPosition(UDim2.new(0.25,-50,1.4,-50), 'In', 'Quad',1)
script.Parent.Text = 'Open Shop'
end
end)

1 comment
It works! Thank you!