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
 

Question

Previous Thread :: Next Thread 
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 12:02 PM

I'vs made this script to create a list of all logs (the logs are in a folder).
Now, my problem is:

The logs are named 1, 2,3...12 and so on. How can I edit my script to have the log called 1 at the top, the log 2 at the second position and so on?


local lg = sp.ConnectedProfile.Value.Logs:GetChildren()
local position = UDim2.new(0,5,0,10)
sp.Logs:ClearAllChildren()
for i=1,#lg do
ag = game.Workspace["Main Server"].Data.Examples.LogShowFormat:Clone()
ag.Creator.Text = "Created by: "..lg[i].IssuedBy.Value
ag.LogID.Text = "Log ID: "..lg[i].LogId.Value
ag.Type.Text = lg[i].Type.Value
ag.Position = position
wait()
position = position + UDim2.new(0,0,0,160)
ag.Parent = sp.Logs
end
sp.Logs.ClipsDescendants = true
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 12:09 PM
bump
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 12:25 PM
bump
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 12:42 PM
bump :/
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
02 Apr 2012 12:46 PM
What is ClipsDescendants?

[ Files Cannot Be Found ]
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
02 Apr 2012 12:48 PM
It clips descendants, derppp
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 01:24 PM
^

okay, who knows the answer?
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 01:38 PM
Bump
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
02 Apr 2012 01:48 PM
If you want to make it with easy way;
Make a table with the positions foreach then;
.Position = positions[i]
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 01:51 PM
Isn't it easier that way? I mean, if there are 200 logs.. Well, I don't want to type 200 positions into this table :)

Is anyone able to answer my question?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
02 Apr 2012 02:15 PM
Oh I thought you had only 12,
I'll start thinking on this after I've slept.. Because it's night out here. :P
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 02:26 PM
Okay :P
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 03:12 PM
Does someone have a solution for this?
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
02 Apr 2012 03:20 PM
hello
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 05:04 AM
Bump?
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 06:01 AM
bump
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 06:32 AM
bump
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 07:32 AM
bump
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
03 Apr 2012 07:53 AM
Btw.. Why doesn't that work?
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 08:06 AM
-facepalm-

Read my text: I need to change it, so the lop called 1 is the first log, the log called 2 is the second log.

The current script does it, but it does randomize them.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
03 Apr 2012 08:12 AM
It should be in order with that.. What creates the logs?
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 08:21 AM
At the moment, I just copy& paste the examples.

Yes, 1-9 are in orders.

But the logs 10+ aren't in order.
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 09:49 AM
hi bump
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
03 Apr 2012 10:00 AM
I just finally understood your script.

Are the logs names like this:

Log1
Log2
Log3

etc...

If they are, you can just do this:

for i = 1, #something do
log = somewhere["Log"..i]
end
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
03 Apr 2012 10:39 AM
Thank you! :)
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