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: Disconnect player?

Previous Thread :: Next Thread 
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:30 AM
Is there a way to disconnect someone from a server, and then not allow them back in?

Kind of like banning them from that server so if they press the play button, a new server HAS to be started for them?
Report Abuse
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 01:35 AM
I don't know what you're talking about, please explain.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:41 AM
Yes. I have it in my admin commands.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:41 AM
But, your last bit makes no sense.
Report Abuse
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 01:43 AM
I'm pretty sure the last bit isn't possible.

The first bit is easy, but do you mean disconnect as in ("This game has shutdown") or as in crashing their client.
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:03 PM
Disconnect as in the player is kicked out of the server....like crashing their client, yes.
But I don't want them to be able to rejoin that specific server, and if they play the game, it won't be able to put them back in that specifc server.

So it's like LITERALLY banning them from that server.........but not the others....
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:07 PM
http://www.roblox.com/Gamert7-39-s-Admin-Commands-Debug-Version-item?id=117183062

Just say "#remove_player_from_server enterplayernamehere" and the script SHOULD do the rest. That command is in debug though because, I can't test it.
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:11 PM
Ok, and I'm not trying to put it into an admin command....FYI..
xD
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:16 PM
This is what I made for a quick little thing...But I haven't been able to test it with others..




game.Players.PlayerAdded:connect(function(play)
wait()
if script.Check.Value == "" then
script.Check.Value = play.Name
elseif
play.Name ~= script.Check.Value then
play:Destroy()
end
end)
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:18 PM
MMk. So what are you trying to do if you do not want to do it via admin command?
Do you mean like through a gui? If so this could work....

table = {}
--Use mousebutton1down and onkeydown function with 'enter'
textbox = --path to your gui
table.insert(table, textbox.Text)
-- All requried ends


coroutine.resume(coroutine.create(function()
on = true
repeat wait()
for _, player in pairs (Game.Players:GetPlayers()) do
if check(player.Name, table) then
var = Workspace.banscript:Clone()
var.Parent = player.PlayerGui

end end
until on == false
end))
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:20 PM
Your script wouldn't crash them and it would ban them from every server assuming it works.
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:23 PM
Well....it's to make a single player game through an alternative method.

I forgot to add a part to my previous script...

This way, only the first player to join can play, and when they leave someone else can play, but I don't want it to make the players wait while viewing what the first is doing. I want them to leave and be put into a new server...if that makes sense.








game.Players.PlayerAdded:connect(function(play)
wait()
if script.Check.Value == "" then
script.Check.Value = play.Name
elseif
play.Name ~= script.Check.Value then
play:Destroy()
end
end)

game.Players.PlayerRemoving:connect(function(play)
if script.Check.Value == play.Name then
script.Check.Value = ""
end
end)
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:32 PM
MMk here.

game.Players.PlayerAdded:connect(function(play)
if game.Workspace.Check == nil then -- This should allow us to have only the first player stay.
key = Instance.new("StringValue", workspace) --Creates the instance..
key.Value = play.Name --Sets the value to the players' name
elseif game.Workspace.Check ~= nil then -- states if the StringValue is already there then this code will run
for _, player in pairs (Game.Workspace:GetPlayers()) do -- Gets the players
if not player.Name == Workspace.Check.Value then -- Says if the player's name isn't = to the StringValue then...
player:Destroy() --The player is destroyed.


end
end
end
end)
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:36 PM
And thus if the player gets destroyed and they leave, the go to a new server?
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:38 PM
Well they would keep coming back. You just set the number of people able to be there too one and you avoid this.
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:42 PM
Well...it NEEDS to be Single Player to be honest.. xD

I set the server max to 6 regardless of this script though.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:47 PM
Then create a gui that tells them they must wait for a new server?
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:50 PM
I don't want them to have to wait, and they won't be able to see the GUI since the player gets destroyed.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:52 PM
True, well there is no other way.. You do know this is a MULTIPLAYER site correct? That is why you don't make singleplayer games..
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 01:53 PM
It may be multiplayer, but sometimes it doesn't work that way. :3
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 01:54 PM
The proof is in the pudding that they will have to wait. http://wiki.roblox.com/index.php/MaxPlayers
Then again you could 'lock a server'
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 02:01 PM
'Lock a server' meaning?
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
28 May 2013 02:11 PM
I am kidding, there is no current way for you to do this.

If somebody disagrees they can post how to do so.
Report Abuse
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
28 May 2013 02:24 PM
When they connect to the game make it so that it punishes them.

I'm grammartastic
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
28 May 2013 02:30 PM
What would that accomplish? xD
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