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: I don't know whats wrong, Its doing my head in!

Previous Thread :: Next Thread 
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
15 Apr 2012 01:42 PM
game.Players.PlayerAdded:connect(function(p)
Board = Instance.new("IntValue", p)
Board.Name = "leaderstats"
Gold = Instance.new("IntValue", Board)
Gold.Name = "Gold"
p:WaitForDataReady()
p.leaderstats.Gold.Value = p:LoadNumber("Gold")
p.Backpack:Destroy()
wait(1)
p:LoadInstance("Back").Parent = p

if p:FindFirstChild("Backpack") == nil then
game.Lighting.Backpack:Clone().Parent = p
end

p.Backpack.ChildAdded:connect(function()
p:SaveInstance("Back", p.Backpack)
end)
game.Players.PlayerRemoving:connect(function()
p:SaveNumber("Gold", p.leaderstats.Gold.Value)
end)
end)

I don't know what is wrong, NO OUTPUT!
Report Abuse
Tiranin is not online. Tiranin
Joined: 03 Apr 2009
Total Posts: 18850
15 Apr 2012 02:24 PM
I don't think Data Presistance works in solo.
Report Abuse
Tiranin is not online. Tiranin
Joined: 03 Apr 2009
Total Posts: 18850
15 Apr 2012 02:25 PM
Ugh, data persistance is like C++ to me.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
15 Apr 2012 02:47 PM
Im not using it in solo -_-
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
16 Apr 2012 09:40 AM
Bump.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
16 Apr 2012 12:01 PM
Nobody is helping because?
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
16 Apr 2012 12:17 PM
Put a few of prints in so you know which part is going wrong.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
16 Apr 2012 12:27 PM
Already have, I CLEARLY said, I don't know what is WRONG!
Report Abuse
thek00lkid is not online. thek00lkid
Joined: 18 Jun 2011
Total Posts: 2778
16 Apr 2012 01:37 PM
Does it do anything at all? Anyways, I think the board variable should be a model.
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
16 Apr 2012 02:37 PM
I have a data persistance script. You can use that. It works with any leaderstats.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
16 Apr 2012 02:43 PM
I fixed it anyway.
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