generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Gui Help

Previous Thread :: Next Thread 
12chip6 is not online. 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
RobloxNewb01 is not online. RobloxNewb01
Joined: 16 Apr 2011
Total Posts: 348
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 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
11 Feb 2012 10:51 PM
Output?
Report Abuse
FananticalMeanBoy is not online. FananticalMeanBoy
Joined: 09 Apr 2011
Total Posts: 4
11 Feb 2012 11:42 PM
How do I make a GUI
Report Abuse
FananticalMeanBoy is not online. FananticalMeanBoy
Joined: 09 Apr 2011
Total Posts: 4
11 Feb 2012 11:45 PM
How do I put music in my game
Report Abuse
12chip6 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image