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

Previous Thread :: Next Thread 
pivot513 is not online. pivot513
Joined: 09 Nov 2012
Total Posts: 328
22 Aug 2013 12:28 PM
I have a game where you can choose what race you want when you first join it, and when you join it again It doesn't show. However, this GUI is still showing everytime I join.

script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Parent:ClearAllChildren()
SaveBoolean('Played', true)
end)

game.Players.PlayerAdded:connect(function(p)
WaitForDataReady()
played = p:LoadBoolean('Played')
if played == true then
script.Parent.Parent.Parent:ClearAllChildren()
end
end)

--hierarchy: StarterGui
-- ScreenGUI
-- Frame
-- ImageButton
-- This Script
Report Abuse
LogicalOre is not online. LogicalOre
Joined: 15 Jul 2013
Total Posts: 32
22 Aug 2013 12:35 PM
CharacterAdded?
Report Abuse
pivot513 is not online. pivot513
Joined: 09 Nov 2012
Total Posts: 328
22 Aug 2013 12:37 PM
I already put in PlayerAdded.
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
22 Aug 2013 12:40 PM
p:WaitForDataReady() try that
Report Abuse
pivot513 is not online. pivot513
Joined: 09 Nov 2012
Total Posts: 328
22 Aug 2013 12:42 PM
I already tried that.
Report Abuse
LogicalOre is not online. LogicalOre
Joined: 15 Jul 2013
Total Posts: 32
22 Aug 2013 12:43 PM
CharacterAdded works when the character respawns but I'm not sure what you are looking for so sorry.
Report Abuse
pivot513 is not online. pivot513
Joined: 09 Nov 2012
Total Posts: 328
22 Aug 2013 12:52 PM
Oh, I see, let me show with comments on each part to explain.

script.Parent.MouseButton1Click:connect(function() --Connects when the button is clicked on
script.Parent.Parent.Parent:ClearAllChildren() --Deletes all children under "ScreenGUI"
SaveBoolean('Played', true) --Saves the fact that the Player has played the game
end)

game.Players.PlayerAdded:connect(function(p) --Connects when a player is added
WaitForDataReady() --Waits for data to load
played = p:LoadBoolean('Played') --Loads if the Player has played before
if played == true then --If the player has played then
script.Parent.Parent.Parent:ClearAllChildren() --Deletes all children under "ScreenGUI"
end
end)
Report Abuse
pivot513 is not online. pivot513
Joined: 09 Nov 2012
Total Posts: 328
22 Aug 2013 01:13 PM
Bump. Please, I need help.
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