|
| 11 Jul 2014 05:37 PM |
Why doesn't this sterpid thing werk
game.Players.PlayerAdded:connect(function(Player) repeat wait() until Player.DataReady local Model=Player:LoadInstance("SavezSwordz") end)
game.Players.PlayerRemoving:connect(function(Player) local Model=Player.StarterGear if Model then Player:SaveInstance("SavezSwordz",Model) end end) |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 06:19 PM |
| Bump :'( it's suppose to save everything in the StarterGear :'( |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 06:44 PM |
| Can some one make me a script to save everything in the player StarterGui? |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 09:19 PM |
k can some one edit this one then
game.Players.PlayerAdded:connect(function(Player) repeat wait() until Player.DataReady local v=Player:LoadInstance("SavezSwordz2") if v then end end)
game.Players.PlayerRemoving:connect(function(Player) for i,v in pairs (Player.StarterGear:GetChildren()) do if v.ClassName == "Tool" then if v then Player:SaveInstance("SavezSwordz2",v) end end end end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 11 Jul 2014 10:03 PM |
| I seriously need this script fixed like now it's the last piece to my puzzle i've been working on for days. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 10:55 PM |
| Wow this post and my other post about this save script has the same views and the same amount of comments well not any more :D |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 11:16 PM |
| Why doesn't any one helpith me! |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 11 Jul 2014 11:22 PM |
| You're not giving 'v' a Parent when loading the data. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 11:25 PM |
| Dude I was thinking about that I was like nawww that can't be the problem but i'll try :D |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 11 Jul 2014 11:26 PM |
game.Players.PlayerAdded:connect(function(Player) repeat wait() until Player.DataReady local v = Player:LoadInstance("SavezSwordz2") if v then v.Parent = Player.StarterGear end end)
game.Players.PlayerRemoving:connect(function(Player) for i,v in pairs (Player.StarterGear:GetChildren()) do if v.ClassName == "Tool" then if v then Player:SaveInstance("SavezSwordz2",v) end end end end) |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 11 Jul 2014 11:26 PM |
I had the exact same problem when I was making my first Save Script. I was loading the data but not giving it a Parent. |
|
|
| Report Abuse |
|
|
| |
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 11 Jul 2014 11:32 PM |
| You also don't need the loop 'repeat wait() until Player.DataReady'. You can just put 'Player:WaitForDataReady()' |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 12 Jul 2014 12:03 AM |
game.Players.PlayerAdded:connect(function (Player) Player:WaitForDataReady() local v = Player:LoadInstance("SavezSwordz2") v.Parent = Player.StarterGear end)
game.Players.PlayerRemoving:connect(function (Player) if Player.DataReady then for _, v in pairs (Player.StarterGear:GetChildren()) do if v.ClassName == "Tool" then Player:SaveInstance("SavezSwordz2",v) end end end end) |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 12:09 AM |
| I fixed it actually all I had to do was remove that if v part :D |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 12:10 AM |
| I'm on the verge of being rich i can feel it surging through my vains BUWAHAHAHHAHAH BUW BUW BUWAHAHAH BUWAHAHAHAHAHAHAHHAHAAHAHA! |
|
|
| Report Abuse |
|
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 12 Jul 2014 12:12 AM |
| I thought the 'if v then' was strange. I mean, you're already getting the children with the 'for _, v in pairs (Player.StarterGear:GetChildren()) do' so why would you need to check for something when it wouldn't run unless something was there? |
|
|
| Report Abuse |
|
|