GiverLol
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 810 |
|
|
| 03 Jan 2013 09:51 AM |
--Script:
function debug()
if script.Parent.Value ~= "" then if script.Parent.Parent.Size == UDim2.new(0, 0, 0, 0) then --Closed script.Parent.Parent.Parent:TweenSize(UDim2.new(0.3, 0, 1, 0)) --Open script.Parent.Parent.Visible = true end end
if script.Parent.Value == "" then if script.Parent.Parent.Size == UDim2.new(0.300000012, 0, 1, 0) then --Opened script.Parent.Parent.Parent:TweenSize(UDim2.new(0, 0, 0, 0)) --Close script.Parent.Parent.Visible = false end end
end
while wait(0.2) do debug() end
--GiverLol--
The fourth if isn't working, how do I get the good size of it?? Thanks!
(I also tryed (0.3, 0, 1, 0), but that also failed) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
GiverLol
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 810 |
|
|
| 03 Jan 2013 09:57 AM |
I tryed, but it needs to be a size, becouse I use TweenSize.
Thanks for your post though. |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 03 Jan 2013 10:09 AM |
if(Frame.Size.X.Scale>0)then -- Open Frame:TweenSize(UDim2.new(0,0,0,0)) else -- Closed Frame:TweenSize(UDim2.new(.3,0,.3,0)) end
-- You should be able to figure this out. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 03 Jan 2013 10:11 AM |
| Maybe he's constantly editing the box open, and closed, and doesn't want to have to change the code every time he changes it. o: |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 03 Jan 2013 10:13 AM |
| @Trioxide. Lol, what did you meant by saying "Use boolean instead". How did you expect it? |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 03 Jan 2013 10:16 AM |
@Zar, like this,
Open = false function OpenClose() Open = not Open Frame:TweenSize(Open and UDim2.new(.3,0,.3,0) or UDim2.new()) end Button.MouseButton1Click:connect(OpenClose) |
|
|
| Report Abuse |
|
|
GiverLol
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 810 |
|
| |
|