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: doesn't save/load data?

Previous Thread :: Next Thread 
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
12 Oct 2013 01:16 PM
Idk whats wrong.

game.Players.PlayerAdded:connect(function(player)

player:WaitForDataReady()
for index, child in pairs(game.Players.Player.PlayerGui.MusicSript.Song:GetChildren())do

local SongData
local success = pcall(function() savedBuildingArea = player:LoadInstance("SongData") end)

if not success or SongData == nil or not SongData then
print "No Data"
else
   print "Loading Data..."
   local offset = area.BasePlate.CFrame.p - savedBuildingArea.BasePlate.CFrame.p
   child:remove() -- deleting default data
   SongData.Parent = game.Players.Player.PlayerGui.MusicSript.Song -- Your song list has loaded =p
   print "Data Loaded"
end

function removePlayer(player)
  if not pcall(function() player:SaveInstance("SongData", child) end) then -- Child is all the songs
end
game.Players.PlayerRemoving:connect(function(player)
   removePlayer(player)
end)
end
end
end)

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
12 Oct 2013 01:20 PM
bump

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
12 Oct 2013 01:44 PM
bump

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
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