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 » Scripters
Home Search
 

Re: How can I do this

Previous Thread :: Next Thread 
mrfergie is not online. mrfergie
Joined: 25 Mar 2010
Total Posts: 522
24 Jan 2015 05:31 PM
I have this to teleport players. But I dont want a allowed people to be teleported. So I have this,

if teleportto~=nil and h.Parent.Name ~= allows then

Also, I have the allows set like this,

allows = {"Player1", "Player2"}

But it only reads the first value of allows (Player1). How can I use multiple allowed names??
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
24 Jan 2015 05:34 PM
function findInTable(t,v)
for a,b in next,t do if b == v then return true end end;
end;


allows = {"Player1", "Player2"};

if teleportto~=nil and not findInTable(allows, h.Parent.Name) then
-- code
end;
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
24 Jan 2015 05:34 PM
Oh please not again one of these thumbs up glitch games...
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Jan 2015 05:35 PM
Iterate through the table with a generic for loop.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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