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: fix?

Previous Thread :: Next Thread 
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Dec 2011 11:10 PM
permission = {"dasfunny"}

function check(val)
for i = 1, #permission do
if permission[i]:upper() == val:upper() then
return true
else return false
end end end

game.Players.PlayerAdded:connect(function(plr) --Again, argument names don't matter
plr.CharacterAdded:connect(function(c)
if check(plr.Name) == true then
print("Player can stay.")
else
c:BreakJoints()
end) end end)
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
27 Dec 2011 12:16 AM
Wouldn't it be :lower() not :upper()?
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
27 Dec 2011 12:17 AM
Your last line of ends is your problem:

end) end end) should be: end end) end)
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
27 Dec 2011 12:19 AM
You've got the ends wrong. First of all, it's ugly when you put them all on one line, don't do that. :c

Second, you have to match up the parentheses right. When it gets to the first end, it ends the last scope that it started, the one with the 'if' statement. Then it gets to the end parenthesis. It looks up right before the end, but the first thing it sees is a function, which requires an end, not an end parenthesis. You gotta have everything in the right order, things can't overlap like that.

end
end)
end)

@Legend: stop earlyposting. kk
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
27 Dec 2011 12:20 AM
@Crazy,

Neva
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