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: GUI Saving Script

Previous Thread :: Next Thread 
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
14 Apr 2013 04:28 AM
I have a script which is meant to save the player's GUI when they leave and then load it back when they join. If they don't have one then they have the default one found in lighting.

Here's the script:

clone = game.Lighting["Quest GUI"]:Clone()

game.Players.PlayerRemoving:connect(function(player)
player:SaveInstance("GUI", player.PlayerGui["Quest GUI"])
end)

game.Players.PlayerAdded:connect(function(player)
WaitForDataReady()
local gooey = player:LoadInstance("GUI")
if gooey then
gooey.Parent = player.PlayerGui
else
clone.Parent = player.PlayerGui
end
end)

Whenever I join I just get the default one in lighting, and I'm not sure if it's possible to test when I'm able to see the output so I can't tell you what that says.
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
14 Apr 2013 06:07 AM
I think it's

player:WaitForDataReady()
Report Abuse
luke111000 is not online. luke111000
Joined: 26 Apr 2009
Total Posts: 1853
14 Apr 2013 06:38 AM
Yes, it's player:WaitForDataReady()
Report Abuse
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
14 Apr 2013 06:56 AM
It still doesn't work.D:

Same as before. Gives me the default GUI but not the saved one.
Report Abuse
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
14 Apr 2013 12:07 PM
Bump
Report Abuse
luke111000 is not online. luke111000
Joined: 26 Apr 2009
Total Posts: 1853
14 Apr 2013 03:27 PM
Read this: http://wiki.roblox.com/index.php/SaveInstance_(Method)
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