|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 29 Jul 2015 12:02 PM |
^
xD. I literally said that to fish, (on Skype) yesterday...
|
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 12:02 PM |
| Ninja'd. That was for warspyking. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 12:03 PM |
| wow I THOUGHT I HAD A FRIENd |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Jul 2015 12:14 PM |
| Warspy why dont you stop harassing me and get the hell out? |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 12:23 PM |
| iSpec I mean you kind of harass people too. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 29 Jul 2015 01:32 PM |
| @iSpec I didn't even TALK to you in this post!?!?!?!?! |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|