function OpenMenu() if script.Parent.Parent.Stuff.Visible == false then script.Parent.Parent.Stuff.Visible = true wait(.01) script.Parent.Parent.Stuff:TweenPosition(UDim2.new(0.04, 0,0.3, 0))--{0.9, 0},{-0.1, 0} to {0.04, 0},{0.3, 0} script.Parent.Parent.Stuff:TweenSize(UDim2.new(0, 200, 0, 300))--{0, 1},{0, 1} to {0, 200},{0, 300} end end function CloseMenu() if script.Parent.Parent.Stuff.Visible == true then script.Parent.Parent.Stuff:TweenPosition(UDim2.new(0.9, 0,-0.1, 0)) script.Parent.Parent.Stuff:TweenSize(UDim2.new(0, 1, 0, 1)) wait(0.5) script.Parent.Parent.Stuff.Visible = false end end script.Parent.MouseButton1Down:connect(OpenMenu) wait(2) script.Parent.MouseButton1Down:connect(CloseMenu)
Im new at lua scripting and this script just sometimes pop up instead of smoothly tweening