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
 

SaveScript Halp!

Previous Thread :: Next Thread 
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
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
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
11 Jul 2014 06:19 PM
Bump :'( it's suppose to save everything in the StarterGear :'(
Report Abuse
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
11 Jul 2014 06:44 PM
Can some one make me a script to save everything in the player StarterGui?
Report Abuse
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
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
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
11 Jul 2014 09:31 PM
Bermp
Report Abuse
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
11 Jul 2014 09:49 PM
#WadaFudge
Report Abuse
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
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
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
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
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
11 Jul 2014 11:16 PM
Why doesn't any one helpith me!
Report Abuse
mark298 is not online. 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
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
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 is not online. 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 is not online. 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
bluebird1287 is not online. bluebird1287
Joined: 16 Jun 2011
Total Posts: 4202
11 Jul 2014 11:27 PM
v = Backpack/Startergear
Report Abuse
mark298 is not online. 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 is not online. 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
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
12 Jul 2014 12:09 AM
I fixed it actually all I had to do was remove that if v part :D
Report Abuse
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
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 is not online. 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
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