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: Creating a custom kick message; help!

Previous Thread :: Next Thread 
DevObject is not online. 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
PerilousDanger is not online. PerilousDanger
Joined: 21 Aug 2012
Total Posts: 3773
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 is not online. DevObject
Joined: 28 Jul 2011
Total Posts: 7048
04 Apr 2016 04:02 PM
Add hat to the end of the script???^



Report Abuse
PerilousDanger is not online. PerilousDanger
Joined: 21 Aug 2012
Total Posts: 3773
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 is not online. DevObject
Joined: 28 Jul 2011
Total Posts: 7048
04 Apr 2016 04:04 PM
that*



Report Abuse
DevObject is not online. 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
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
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 is not online. 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
DevConsole is not online. DevConsole
Joined: 02 Jun 2008
Total Posts: 460
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 is not online. DevObject
Joined: 28 Jul 2011
Total Posts: 7048
04 Apr 2016 04:49 PM
How do I do that Dev?



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