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: Why wont this ban function work?

Previous Thread :: Next Thread 
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
29 Jul 2015 11:37 AM
local Banned = {} -- The table of banned people

-- The function to check if a player is banned
local function IsBanned(Player)
for Number = 1,#Banned do
if Banned[Number]:lower() == Player.Name:lower() then
return true
end
end
end


-- Checking if a player is banned

local function PlayerAdded(Player)
if IsBanned(Player) then
Player:Kick()
end
end

However, when I insert "Player" into banned, it doesn't kick player when he joins.


Players.PlayerAdded:connect(PlayerAdded);
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
29 Jul 2015 11:39 AM
local function isPlayerBanned(Plr)
for i = 1,#Banned do
if Banned[i]:lower() == Plr.Name:lower() then
return true
end
end
return false
end

game:GetService("Players").PlayerAdded:connect(function(Player)
if IsPlayerBanned(Player) then
Player:Kick("You are banned")
end
end)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
29 Jul 2015 12:00 PM
local Banned = {
fishguy100 = true,
iSpecializinq = true
}

game.Players.PlayerAdded:connect(function(p)
if Banned[p.Name] then
p:Kick()
end
end)
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
29 Jul 2015 12:01 PM
FOR I,PEE IN PEARS GAME.PLAYRES. BANNED PEOPLE DO
BANNED PERSONS KICK (U DO NOT BELONG HERE UR IN THE BAN LISTT]
END]
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
29 Jul 2015 12:02 PM
^

xD.
I literally said that to fish, (on Skype) yesterday...
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
29 Jul 2015 12:02 PM
Ninja'd. That was for warspyking.
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
29 Jul 2015 12:03 PM
wow I THOUGHT I HAD A FRIENd
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
29 Jul 2015 12:05 PM
Keep thinking buddy.
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
29 Jul 2015 12:14 PM
Warspy why dont you stop harassing me and get the hell out?
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
29 Jul 2015 12:23 PM
iSpec I mean you kind of harass people too.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Jul 2015 12:52 PM
Are you testing in Play Solo? Sometimes PlayerAdded is not fired (I thought they fixed this but I'm not sure).
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
29 Jul 2015 12:55 PM
why are you here

"If you are good at something, never do it for free." - The Joker
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
29 Jul 2015 01:32 PM
@iSpec I didn't even TALK to you in this post!?!?!?!?!
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
29 Jul 2015 01:34 PM
"iSpecializinq = true"

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
29 Jul 2015 01:43 PM
Yeah and I put fish in there too. They had both posted on the thread, I would've done it with anybody who had posted.
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