12chip6
|
  |
| Joined: 12 Feb 2010 |
| Total Posts: 40 |
|
|
| 11 Feb 2012 10:04 PM |
Ok I'm making a war game, and I'm working on a choose gun GUI. All of my text buttons disappear when they are supposed to but blank text labels (text boxes) remain on the screen. Here is the script I'm using:
player = script.Parent.Parent.Parent backpack = player.Backpack
function chooseClass(class) for i, v in pairs(backpack:GetChildren()) do v:remove() end for i, v in pairs(class:GetChildren()) do if v:IsA("Tool") then v:clone().Parent = backpack elseif v:IsA("HopperBin") then v:clone().Parent = backpack end end script.Parent.Main.Visible = false --no new class for a little bit wait(30000) script.Parent.Main.Visible = true --allow to pick a different class end
for i, v in pairs(script.Parent.Main:GetChildren()) do v.MouseButton1Up:connect(function () chooseClass(v) end) end
Note: The Thing that disappears is called "Main". The text boxes are called "TextBoxes". Guns are in the Main. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2012 10:08 PM |
| :O I didn't know v can be split into 2 variables and be used at the same time! Why 2 v's? |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
| |
|
| |
|
|
| 11 Feb 2012 11:45 PM |
How do I put music in my game
|
|
|
| Report Abuse |
|
|
12chip6
|
  |
| Joined: 12 Feb 2010 |
| Total Posts: 40 |
|
|
| 12 Feb 2012 08:04 PM |
| I'll try output, but I don't think it's a problem... idk... |
|
|
| Report Abuse |
|
|