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
 

Basic dp will not work.

Previous Thread :: Next Thread 
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
02 Mar 2013 01:43 PM
game.Players.PlayerAdded:connect(function(pla)
repeat wait() until pla.PlayerGui
if pla:WaitForDataReady() then
pla.PlayerGui.Payday.Frame.Money.Value = pla:LoadNumber("Money")
end
end)

game.Players.ChildRemoved:connect(function(player)
repeat wait() until player.PlayerGui
if player.DataReady then
if workspace:findFirstChild(player.Name.." money") then
player:SaveNumber("Money", workspace:findFirstChild(player.Name.." money").Value)
workspace:findFirstChild(player.Name.." money"):Destroy()
end
end
end)
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
02 Mar 2013 01:57 PM
game.Players.PlayerAdded:connect(function(pla)
repeat wait() until pla.PlayerGui
pla:WaitForDataReady() -- Doesn't return anything
pla.PlayerGui.Payday.Frame.Money.Value = pla:LoadNumber("Money")
end)

game.Players.ChildRemoved:connect(function(player)
repeat wait() until player.PlayerGui
pla:WaitForDataReady()
if workspace:findFirstChild(player.Name.." money") then
player:SaveNumber("Money", workspace:findFirstChild(player.Name.." money").Value)
workspace:findFirstChild(player.Name.." money"):Destroy()
end
end)
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