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 » Scripters
Home Search
 

Re: Ok, I've tried to fix this a million times

Previous Thread :: Next Thread 
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
23 Jan 2015 02:05 PM
Or at least for officially the past week.

I really need the scripts inside of these to choose two different numbers no matter what, but if you test it you see that they are somehow choosing the same numbers, you can also see how my things are set up if that helps.

I figured the only way for it to get fixed is for me to make it a free model, so here:
www.roblox.com/Chests-item?id=207081569


Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
23 Jan 2015 02:09 PM
What is it supposed to do? Each chest display different tools?

Hey, check this place out! http://www.roblox.com/Maze-Escape-Deep-Alpha-place?id=194858740
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
23 Jan 2015 02:10 PM
@Hibobb
Yes.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
23 Jan 2015 02:15 PM
There could be something wrong with the part of the script that ensures it doesn't pick the same thing twice. Just use table.remove, it is easier to read and understand and use.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
23 Jan 2015 02:21 PM
@Jarod
If I use table.remove, won't that just completely remove the table and make it so nothing's visible?
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
23 Jan 2015 02:28 PM
Wouldn't it be easier to have one script control both boxes? So you have your table of tools:

local tools = {"Sword","Bat",etc.}

then make a "clone table"

local ctools = tools

and then choose six tools from the list and remove them once chosen

chosenTools = {}
for i = 1,6 do
if #ctools > 0 then
local chosen = math.random(1,#ctools)
table.insert(chosenTools,ctools[chosen])
table.remove(ctools,chosen)
end
end


Hey, check this place out! http://www.roblox.com/Maze-Escape-Deep-Alpha-place?id=194858740
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
23 Jan 2015 02:31 PM
Well do a copy of the table and use table.remove on that instead.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
23 Jan 2015 02:32 PM
The thing is, they aren't actual tools, they're just ImageButtons. Is that technique gonna work for them too?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
23 Jan 2015 02:35 PM
Of course. Why wouldn't it?
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
23 Jan 2015 02:38 PM
@Hibobb
Where do I put the script. Is workspace fine?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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