script.Parent.MouseButton1Click:connect(function()
	if script.Parent.openclose.Value == false then
		script.Parent.Parent:TweenPosition(UDim2.new(0.7, 0, 0.4, 0)'out', 'Linear', 1)
		script.Parent.Parent.Parent.mainshop:TweenPosition(UDim2.new(0.2, 0, 0.4, 0)'out', 'Linear', 1)
		script.Parent.openclose.Value = true
	elseif script.Parent.openclose.Value == true then
		script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0.4, 0)'in', 'Linear', 1)
		script.Parent.Parent.Parent.mainshop:TweenPosition(UDim2.new(-5, 0, 0.4, 0)'in', 'Linear', 1)
		script.Parent.openclose.Value = false 
	end
	
end)

2 comments

0

Is open/close a stringValue, if so, this all breaks in line 2

0

You may have to capitalize "out" and "in" > "Out" and "In".