of     1   

PraetorianTheGod
#182869890Tuesday, February 02, 2016 3:55 AM GMT

I have a simple shop open and close script using tweening, and when I open it it comes in perfectly, it closes well too but after I try to open it again it doesn't open anymore script.Parent.Parent.OpenClose.MouseButton1Click:connect(function() if Open == false then script.Parent.Parent.OpenClose.Text = "Close" script.Parent:TweenPosition(UDim2.new(0.5, -150,0.5, -250)) Open = true elseif Open == true then script.Parent:TweenPosition(UDim2.new(-1, -150,0.5, -250)) script.Parent.Parent.OpenClose.Text = "Shop" Open = false end end)
LuaAtrocities
#182913907Wednesday, February 03, 2016 2:27 AM GMT

local pos1 = UDim2.new(0.5,-150,0.5,-250) local pos2 = UDim2.new(-1, -150,0.5, -250) script.Parent.Parent.OpenClose.MouseButton1Click:connect(function() if script.Parent.Position == pos1 then script.Parent:TweenPosition(pos2,'Out','Quad',0.3) script.Parent.Parent.OpenClose.Text = "Close" else script.Parent.Position == pos2 then script.Parent:TweenPosition(pos1,'Out','Quad',0.3) script.Parent.Parent.OpenClose.Text = "Shop" end end)

    of     1