Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 19 Nov 2012 12:56 AM |
So here is the basics of my problem
This is the output near the error: 16:36:33.102 - Workspace.HideAndSeek:12: attempt to get length of local 'maps' (a userdata value) 16:36:33.104 - Script "Workspace.HideAndSeek", Line 12 16:36:33.107 - stack end
And here is a few lines of code near the problem at line 12. local maps0 = game.Lighting --Line 10 local maps = maps0:FindFirstChild("Maps", true) --Line 11 local currLevel = maps[math.random(#maps)] -- Line 12 print("Loaded 0") -- Line 13
Also I was getting an error here whenever it sometimes somehow works. print("No. of maps is equal to: "..currLevel) But I don't have the error log as I get this error on occasion Also it is not like I have not put any effort into this, I have actually spent a few days trying to figure out this one problem. Google'd many different methods like FindFirstChild and things to try and find a solution. None of them have worked yet though, so this is last resort. Would someone be so kind as of to help a young (Robox) scripting newb? (Can actually make some basic minecraft mod code...) |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 19 Nov 2012 01:05 AM |
local maps0 = game.Lighting:findFirstChild("Maps") local maps = maps0:GetChildren() local currLevel = maps[math.random(#maps)] print(tostring(currLevel)) |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 19 Nov 2012 01:06 AM |
| and you don't need tostring() on the print, my bad. |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 19 Nov 2012 02:21 AM |
| Done what you said. Now, it seems to work, just cleaning up some other bugs and t should be functional. :) |
|
|
| Report Abuse |
|
|
7youyou25
|
  |
| Joined: 24 Aug 2011 |
| Total Posts: 19 |
|
|
| 19 Nov 2012 10:02 AM |
| plz teach me how to get into the place where you script |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 20 Nov 2012 01:01 AM |
| Now I need a solution to this please, So I am cloning a random selected map and INSIDE each map is a spawns model, however how can I make it so It knows how to find the model "Spawns" inside of a randomly selected model? Is there a quick way or am I going to have to make some huge amount of code? |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
| |
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 20 Nov 2012 03:51 AM |
| Please? I really need a hand with this... |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 20 Nov 2012 03:53 AM |
| Not even a full answer, just some sort of hint or idea would be nice. |
|
|
| Report Abuse |
|
|
Solotaire
|
  |
| Joined: 30 Jul 2009 |
| Total Posts: 30356 |
|
|
| 20 Nov 2012 08:01 AM |
mapName = --the map you've cloned into workspace followed by ".Name" workspace[mapName].SpawnLocation |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 21 Nov 2012 01:00 AM |
| This actually didn't help one bit. |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 21 Nov 2012 04:08 AM |
| Also, if anyone asks. I can provide code if you want to see what I'm trying... |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
| |
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 25 Nov 2012 02:39 AM |
| anyone? Also in basic terms if you could please because I'm not too good of a scripter. |
|
|
| Report Abuse |
|
|
Jackd44
|
  |
| Joined: 19 Dec 2008 |
| Total Posts: 200 |
|
|
| 25 Nov 2012 02:54 AM |
| Actually, I will make this into a new thread. |
|
|
| Report Abuse |
|
|