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: How would I....

Previous Thread :: Next Thread 
REM25 is not online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
02 Dec 2013 07:50 PM
How can I close the game if the player clicks a certain Gui button? Is this possible? Ex. Exit button and the whole game closes rather than the kick method
Report Abuse
SymbolumSicarius is not online. SymbolumSicarius
Joined: 23 Jun 2009
Total Posts: 2899
02 Dec 2013 07:54 PM
Well,
I guess you can just kick everyone.



Remove everything?

function b(loc)
for _,v in pairs(loc:GetChildren()) do
if v:IsA("BasePart") and v.Name ~= "Terrain" and v.Name ~= "Camera" or v.Parent == game.Players then
v:Destroy()
else
b( v )
end
end
end

script.Parent.MouseButton1Down:connect(function(p)
b(game)
end)

I suppose?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
02 Dec 2013 08:27 PM
^ That might work... But idk what happens if the player with the GUI gets kicked. Will the script still run?

A better idea might be while true do end in a normal script...
Report Abuse
REM25 is not online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
02 Dec 2013 11:54 PM
First of all is it possible to close a game using a script?
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
03 Dec 2013 12:35 AM
yush!
kicking all the player disconnects the game!


all = game.Players:GetChildren()
for i = 1,#all do
all[i]:Kick()

Report Abuse
Electrocus is not online. Electrocus
Joined: 18 Aug 2012
Total Posts: 50
03 Dec 2013 12:36 AM
No you cannot close the window.
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
03 Dec 2013 12:39 AM
yeah.
It shuts down.
Report Abuse
Electrocus is not online. Electrocus
Joined: 18 Aug 2012
Total Posts: 50
03 Dec 2013 12:42 AM
Yes, it does shut down, but it does not close the window. It just disconnects and present the 'Shut down' GUI.
Report Abuse
REM25 is not online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
03 Dec 2013 11:43 AM
Kev not only do I want them "kicked" I also want the game to close so yeah I don't think that's possible.
Report Abuse
REM25 is not online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
03 Dec 2013 05:55 PM
Is it possible?
Report Abuse
Adam2090 is not online. Adam2090
Joined: 19 Jul 2010
Total Posts: 889
03 Dec 2013 06:14 PM
It is not possible to close the game client. But there are several ways to make it unresponsive.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Dec 2013 06:15 PM
You could crash them, but that's not really closing it...
They would have to close it in order to stop lagging, so yeah.

while wait(1/44) do delay(0, function() while true do end end) end
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
03 Dec 2013 06:19 PM
Ok, no, it is NOT posssible for make then exit the window by a script, only by the red X.
Report Abuse
REM25 is not online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
03 Dec 2013 06:37 PM
alright thanks
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