|
| 09 Apr 2015 09:35 PM |
So I want to list all the information in my table but cant cease to figure out how. Here are the two parts I need for the script.
commands={"forcefield","no forcefield","self destruct","new part","sanic fast","add speed"}
h=Instance.new("Hint",p.PlayerGui) h.Text="Their are a total of "..cn.." commands so far. Lemme list them for ya" wait(2) h.Text=commands
[Haydebug2003] http://www.roblox.com/My/Groups.aspx?gid=2542302 [22/22 eggs!] |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 09:38 PM |
1
[Haydebug2003] http://www.roblox.com/My/Groups.aspx?gid=2542302 [22/22 eggs!] |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 09 Apr 2015 09:41 PM |
| table.concat(commands, \n) |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 09 Apr 2015 09:42 PM |
for i,v in next, commands do h.Text = h.Text..v..", " end
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
| |
|
|
| 09 Apr 2015 09:44 PM |
@ii Is their a way were I can do two at once? like two of the commands in the table, then two more after 5 seconds??
[Haydebug2003] http://www.roblox.com/My/Groups.aspx?gid=2542302 [22/22 eggs!] |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 09 Apr 2015 09:49 PM |
@ iiEssence
I actually had no idea that was a function.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 09:50 PM |
b1
[Haydebug2003] http://www.roblox.com/My/Groups.aspx?gid=2542302 [22/22 eggs!] |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 09 Apr 2015 09:53 PM |
h=Instance.new("Hint",p.PlayerGui) h.Text="Their are a total of "..cn.." commands so far. Lemme list them for ya" text = "" if #commands/%2 == 0 then for i = 1,math.ceil(#commands/2) do text = text .. commands[(i*2)-1] .. "\n" .. commands[i*2] .. "\n" wait(2) end else for i = 1,math.ceil(#commands/2) do if i == math.ceil(#commands/2) then else text = text .. commands[(i*2)-1] .. "\n" wait(2) end end end |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
| |
|
|
| 09 Apr 2015 09:58 PM |
commands={"forcefield","no forcefield","self destruct","new part","sanic fast","add speed"}
h = Instance.new("Hint", p.PlayerGui) h.Text = "There are a total of " .. #commands .. " so far. Here's a list..." for i, v in pairs(commands) do if i % 2 then h.Text = v else h.Text = h.Text .. ", " .. v wait(2) end end
Try that maybe?
-The [Guy] |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 10:00 PM |
Ah sorry, add a wait(2) after the h.Text = "There are a total of" etc line, otherwise it will just skip over that too fast.
-The [Guy] |
|
|
| Report Abuse |
|
|