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: What happens if

Previous Thread :: Next Thread 
SNIVYmc is not online. SNIVYmc
Joined: 31 Oct 2015
Total Posts: 500
20 Sep 2017 09:58 PM
game:Destroy xD


Report Abuse
ISeeYourPost is not online. ISeeYourPost
Joined: 10 Jun 2013
Total Posts: 1815
20 Sep 2017 10:01 PM
actually its game:destroy()
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
20 Sep 2017 10:18 PM
^

False

it's always :Destroy()

I am actually going to try that XD



Report Abuse
triode is not online. triode
Joined: 13 Aug 2011
Total Posts: 5844
20 Sep 2017 10:20 PM
You can't set the parent of game to NULL.
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
20 Sep 2017 10:22 PM
Oh yeah, I forgot.

But you can destroy PlayerGui and probably any other descendants of game



Report Abuse
Watstend is not online. Watstend
Joined: 16 Sep 2016
Total Posts: 108
20 Sep 2017 11:12 PM
You could do:
game.Workspace:ClearAllChildren()
for i, v in pairs(game.Players:GetPlayers()) do
v.PlayerGui:ClearAllChildren()
end

This would delete everything in the workspace and everyones guis, including the chat and player list.
Don't use Destroy() use Remove(), Destroy() is deprecated

roblox.forum:ClearAllChildren()
Report Abuse
Watstend is not online. Watstend
Joined: 16 Sep 2016
Total Posts: 108
20 Sep 2017 11:14 PM
Thats how I do a server shutdown, except I remove all the players instead of removing their guis :)

roblox.forum:ClearAllChildren()
Report Abuse
Fluent_Lua is not online. Fluent_Lua
Joined: 03 Oct 2011
Total Posts: 1290
20 Sep 2017 11:21 PM
"Don't use Destroy() use Remove(), Destroy() is deprecated"

sigh...

http://wiki.roblox.com/index.php?title=API:Class/Instance/Remove

"This item is deprecated. Do not use it for new work."


#code Do not give up; the beginning is always the hardest part.
Report Abuse
Watstend is not online. Watstend
Joined: 16 Sep 2016
Total Posts: 108
20 Sep 2017 11:23 PM
Oops, I've been using Remove() . . .

roblox.forum:ClearAllChildren()
Report Abuse
ISeeYourPost is not online. ISeeYourPost
Joined: 10 Jun 2013
Total Posts: 1815
21 Sep 2017 07:56 AM
@whoever replied, simple error i meant to capitalize the letter.
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