|
| 09 Mar 2014 09:12 AM |
I have the "script.Parent.Parent" correct. I made a note next to the line that Roblox says is wrong.
local BlueBox = script.Parent.Parent
script.Parent.MouseButton1Down:connect(function() if BlueBox.Size == {0,200},{0,55} then --This line is underlined in red. Why? BlueBox.Size = {0,55},{0,55} elseif BlueBox.Size == {0,55},{0,55} then BlueBox.Size = {0,200},{0,55} end end)
Thanks to whoever helps! :) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 09 Mar 2014 09:18 AM |
@super
You mean after "end)"? Or after the first "then"? |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:18 AM |
@cool
I'm not entirely sure, as I'm not expert at this, but I believe so. What would I have to do differently because of that? |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:18 AM |
after the first "then"
if that doesnt work then try AFTER the "end" |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:19 AM |
| Ok you have to change it to UDim2.new(0, 200, 0, 55), I think |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:20 AM |
local BlueBox = script.Parent.Parent
script.Parent.MouseButton1Down:connect(function()
if BlueBox.Size == "{0,200},{0,55}" then BlueBox.Size = UDim2.new("{0,55},{0,55}") elseif BlueBox.Size == {0,55},{0,55} then BlueBox.Size = UDim2.new("{0,200},{0,55}") end end)
I am not exactly sure, I don't use UDim2's much |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:20 AM |
| warspyking thats what I said. |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:20 AM |
@cool
i dont think so..
i could be wrong |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Mar 2014 09:22 AM |
| I did? Yay lol, I took a guess... |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:24 AM |
| Wait, whyd u make the Size a string value? Isnt it a number value? |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:25 AM |
local BlueBox = script.Parent.Parent
script.Parent.MouseButton1Down:connect(function()
if BlueBox.Size == (0,200),(0,55) then BlueBox.Size = UDim2.new(0,55,0,55) elseif BlueBox.Size == (0,55),(0,55) then BlueBox.Size = UDim2.new(0,200),(0,55) end end) |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:29 AM |
| I made it a string value because it has {}'s inside it! |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:34 AM |
| I've tried all of the ways you guys have suggested. Thanks for trying to help, but it's just not working. |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:36 AM |
| Lemme do a quick wiki search... |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:38 AM |
Move out da way I got dis. I work with GUI's
local BlueBox = script.Parent.Parent
script.Parent.MouseButton1Down:connect(function()
if BlueBox.Size == UDim2.new(0,200,0,55) then --This line is underlined in red. Why? BlueBox.Size = UDim2.new(0,55,0,55) else -- Why the unnecessary 'elseif'? BlueBox.Size = UDim2.new(0,200,0,55) end end) |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:44 AM |
local BlueBox = script.Parent.Parent
script.Parent.MouseButton1Down:connect(function()
if BlueBox.Size == (0, 200, 0, 55)then BlueBox.Size = UDim2.new(0, 55, 0, 55) elseif BlueBox.Size == (0, 55, 0, 55) then BlueBox.Size = UDim2.new(0, 200, 0, 55) end end) |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:44 AM |
| Tell me if it works. :3 If not I will try to fix it some more! :3 |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:45 AM |
| @War... I already posted the script fixed (btw the first line needs UDim2.new also! :3) |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:45 AM |
local BlueBox = script.Parent.Parent
script.Parent.MouseButton1Down:connect(function()
if BlueBox.Size == UDim2.new(0, 200, 0, 55)then BlueBox.Size = UDim2.new(0, 55, 0, 55) elseif BlueBox.Size == UDim2.new(0, 55, 0, 55) then BlueBox.Size = UDim2.new(0, 200, 0, 55) end end)
Sorry made a simple mistake in last post... |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:46 AM |
| Oh sorry grag I never noticed |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:47 AM |
@gragger
It worked, thanks!
And thanks to everyone else who tried to help. :) |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 09:51 AM |
| No problem! Come back if you need more help! :3 |
|
|
| Report Abuse |
|
|