of     1   

AbstractMadness
#169049848Tuesday, July 28, 2015 2:13 AM GMT

basically kicks all players and prevents people from joining "If you are good at something, never do it for free." - The Joker
VCRaygamma
#169053317Tuesday, July 28, 2015 2:48 AM GMT

Ever heard of a feature you can do from the game page called "Shut Down All Instances"?
AbstractMadness
#169057925Tuesday, July 28, 2015 3:38 AM GMT

Ever heard of scripting? "If you are good at something, never do it for free." - The Joker
ScottHolt02
#169061024Tuesday, July 28, 2015 4:12 AM GMT

For a single server?
AbstractMadness
#169061601Tuesday, July 28, 2015 4:18 AM GMT

@Scott yes "If you are good at something, never do it for free." - The Joker
sharpchain1
#169065248Tuesday, July 28, 2015 4:58 AM GMT

Why would you need to do that if u dont want people to play then just make the game inactive and if you really want it that bad then just make a script that kicks all players and btw you cannot prevent players from joining that server because once all players are gone the server is destroyed and roblox will just make another server once it needs another one so I do not support this one it just doesn't make sense
cpmoderator12345
#169065747Tuesday, July 28, 2015 5:05 AM GMT

Sharp you obviously don't understand. The owner might not be online and its good to handle all problems gracefully (ever heard of exception handling? Yeah. It's called 'catch' in most languages and 'else' and 'elseif' in lua. //cpmody\\ i am a windows operating system confirmed //
cpmoderator12345
#169065967Tuesday, July 28, 2015 5:08 AM GMT

Also, I might have a workaround for this suggestion... -- if boolean, use this code if SHUTDOWN_BOOL == true then repeat local players = game.Players:GetPlayers() for i=1, #players do local currentplayer = players[i] currentplayer:Kick() end until game.Players.NumPlayers == 0 end //cpmody\\ i am a windows operating system confirmed //
cpmoderator12345
#169066105Tuesday, July 28, 2015 5:09 AM GMT

And if its an event remove the final end, and the if statement, and add: game.Workspace.ShutdownEvent.Event:connect(function() [[assuming the BindableEvent is in Workspace]] -- code here end) //cpmody\\ i am a windows operating system confirmed //
AbstractMadness
#169066110Tuesday, July 28, 2015 5:10 AM GMT

Uh... function shutdown() for _,plr in next, game.Players:GetPlayers() do plr:Kick("This game has been shutdown.") end shutdown = true end game.Players.PlayerAdded:connect(function(plr) if shutdown then plr:Kick("This game has been shutdown.") end end) is a solution, but I don't want to put that in /every/ script. "If you are good at something, never do it for free." - The Joker
Semaphorism
#169066325Tuesday, July 28, 2015 5:12 AM GMT

you don't put it in every script.... only the one.
cpmoderator12345
#169066424Tuesday, July 28, 2015 5:14 AM GMT

^ damn i hope i dont get ninja'd by op doe //cpmody\\ i am a windows operating system confirmed //
Semaphorism
#169066517Tuesday, July 28, 2015 5:15 AM GMT

Also cpmoderator, Lua uses something called pcall, not elseif/else for exceptions local success, errormessage = pcall(function() -- Do code here, if it errors, it won't break the script. end) if not success then print(errormessage) shutdown() end
VCRaygamma
#169182080Wednesday, July 29, 2015 3:29 AM GMT

Yes I've heard of scripting. Also, how would you be able to shut down a running server in studio? I mean there's no way to edit a certain server in studio I think. Unless roblox adds a feature to view a certain running server, then this feature wouldn't work.

    of     1