DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
|
| 04 Apr 2016 03:59 PM |
allowed = {"zXQuickShotXz", "DevObject", "MasterOfTHeAngels","GasolineIsLife","Lemonkit"}
function checkOkToLetIn(name) for i = 1,#allowed do if (string.upper(name) == string.upper(allowed[i])) then return true end end return false end
function enter(play) wait() if (checkOkToLetIn(play.Name)) then print("Welcome"..play.Name.."") else wait() play:Remove() end end
game.Players.ChildAdded:connect(enter)
I have that script to kick all players except for certain ones. However I want to add a custom message that it says when it kicks you instead of saying "This Game Has Shutdown" I want it to be custom and in the same red box. Please help.
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 04:01 PM |
game.Players.PlayerAdded:connect(function(plr) if (checkOkToLetIn(plr.Name)) then print('Welcome',plr.Name) else plr:Kick('Custom Message Here') end end) |
|
|
| Report Abuse |
|
|
DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
|
| 04 Apr 2016 04:02 PM |
Add hat to the end of the script???^
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 04:04 PM |
delete:
function enter(play) wait() if (checkOkToLetIn(play.Name)) then print("Welcome"..play.Name.."") else wait() play:Remove() end end
game.Players.ChildAdded:connect(enter)
add the other stuff to the end, yes |
|
|
| Report Abuse |
|
|
DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
| |
|
DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
|
| 04 Apr 2016 04:05 PM |
Hmm, still didn't work, let me check the output
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 04:21 PM |
kick()'s first (and only) argument is what is displayed as the kick message instead of "this game has shut down".
|
|
|
| Report Abuse |
|
|
DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
|
| 04 Apr 2016 04:28 PM |
| It's not working, it's still saying "This Game Has Shut Down" |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 04:39 PM |
don't use player names in instances like these, if your mates change their name it's a nuisance to update it. check by playerID.
|
|
|
| Report Abuse |
|
|
DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
| |
|