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: table.insert

Previous Thread :: Next Thread 
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
04 Oct 2012 06:38 PM
I'm thinking I did something wrong with the table.insert, any Help?

-----------------------

admins = {"thecaptain97"}
banned = {"Noob"}

function checkBan(p)
for i = 1,#banned do
if (banned[i]==p.Name) then
return true
end
end
return false
end

function checkAdmin(p)
for w = 1,#admins do
if (admins[w]==p.Name) then
return true
end
end
return false
end

game.Players.PlayerAdded:connect(function(ply)
if (checkBan(ply)==true) then
repeat wait() until ply.PlayerGui
script.Crash:clone().Parent = ply.PlayerGui
elseif (checkAdmin(ply)==true) then
ply.Chatted:connect(function(msg)
if (string.sub(msg,1,4):lower()=="ban/") then
if (game.Players:findFirstChild(string.sub(msg,5))) then
bandude = game.Players[string.sub(msg,5)]
table.insert(banned,bandude.Name,#banned+1)--AROUND HERE
repeat wait() until ply.PlayerGui
script.Crash:clone().Parent = ply.PlayerGui
end
end
end)
end
end)

Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
04 Oct 2012 06:41 PM
    table.insert(banned,#banned+1,bandude.Name)

¤ ¤ † K M X D † ¤ ¤
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
04 Oct 2012 06:42 PM
Thanks knightmare, I knew I did something Wrong There, since I rarely use table.insert
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
04 Oct 2012 06:45 PM
No problem.

¤ ¤ † K M X D † ¤ ¤
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