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 » Game Design
Home Search
 

Re: "bad argument #2 to 'random' (interval is empty)" HELP?!

Previous Thread :: Next Thread 
PurpleTerror is not online. PurpleTerror
Joined: 05 Oct 2010
Total Posts: 7368
17 Mar 2015 05:58 PM
HELP?!?! this error is driving me completely NUTS!!

Here is part of the script so you can study it and fix it:

--Scripted By PurpleTerror. If you copy this game with a hacking tool, you are illegaly obtaining the code for my game.

status = game.ServerScriptService.Status
local sfx = {}
local type = {}
leaderboard = nil
local w = game.Workspace:getChildren()
for i=1,#w do
if w[i].Name == "leaderboard" and w[i]:findFirstChild("running") ~= nil and w[i]:findFirstChild("points") ~= nil then
leaderboard = w[i]
end
end

for i,game in pairs (game.ServerStorage:FindFirstChild("enemies"):GetChildren()) do
table.insert(type,#type+1,type.Name)
end

--for i,game in pairs (game.ServerStorage:FindFirstChild("Maps"):GetChildren()) do
--table.insert(map,#map+1,game.Name)
--end

for i,game in pairs (game.ServerStorage:FindFirstChild("SoundTrack"):GetChildren()) do
table.insert(sfx,#sfx+1,game.Name)
end

while true do
print(#type)
typeName = type[math.random(1, #type)]
typeName = game.ServerStorage.Maps:FindFirstChild(typeName)
typeClone = typeName:Clone()
sfxClone.Parent = game.Workspace
game.Workspace.Lobby:Play()
for i = 15, 1, -1 do
status.Value = "Intermission: "..i
wait(1)
end
Report Abuse
PurpleTerror is not online. PurpleTerror
Joined: 05 Oct 2010
Total Posts: 7368
17 Mar 2015 06:00 PM
its in line 28
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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