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: when i do for i,v in pairs, it only does 1

Previous Thread :: Next Thread 
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 05:24 PM
I have it where i think it is supposed to put a letter for each box. It only puts it for 1. Here is the code:

local letters = script.Parent:WaitForChild("LettersMixed"):GetChildren()
local mixer1 = {"E","P","K","R","S","L","A"}

for i,letters in pairs (letters) do
if passed1 == false then
for i=7,#mixer1 do
if letters.Text == "Nil" then
letters.Text = mixer1[i]
letters.Name = mixer1[i]
end
end
end
end
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
18 Sep 2014 05:26 PM
local letters = script.Parent:WaitForChild("LettersMixed"):GetChildren()
local mixer1 = {"E","P","K","R","S","L","A"}

for i,letters in pairs (letters) do
if passed1 == false then
while i ~= #mixer1 do
if letters.Text == "Nil" then
letters.Text = mixer1[i]
letters.Name = mixer1[i]
end
end
end
end
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 05:30 PM
thanks
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 05:31 PM
just tried it, didn't work
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
18 Sep 2014 05:32 PM
He's trolling. A simple glance at his script should have told you that...
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 05:36 PM
I got his thing to work but again it is only does 1 still.

Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 05:41 PM
help.
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 05:45 PM
....
Report Abuse
murcury57 is not online. murcury57
Joined: 30 Jun 2010
Total Posts: 90299
18 Sep 2014 05:47 PM
[ Content Deleted ]
Report Abuse
Deplexity is not online. Deplexity
Joined: 18 Nov 2011
Total Posts: 1965
18 Sep 2014 05:47 PM
I think this is your problem:

for i=7,#mixer1 do

Because its starts at 7 and there are 7 letters in 'mixer1' (if i did my counting right), it will only run once.
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 06:16 PM
It still only shows up one letter on the box's.

It changed the letter of the first box though.



Check here to see it: http://www.roblox.com/SparkleOffs-Place-Number-37-place?id=176021994
STEP ON THE BRICK BEHIND YOU WHEN YOU SPAWN
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 06:26 PM
Bump
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
18 Sep 2014 06:27 PM
for i = 1,#mixer1 do
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 06:33 PM
^ i said i already tried that.
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 06:43 PM
....
Report Abuse
FireFume is not online. FireFume
Joined: 03 Aug 2012
Total Posts: 1654
18 Sep 2014 06:58 PM
iv = index, value not value,index
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
18 Sep 2014 08:24 PM
what? ^
Report Abuse
DukeCow is not online. DukeCow
Joined: 20 Nov 2010
Total Posts: 13176
18 Sep 2014 09:22 PM
u used variable i twice kiddo
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