|
| 30 Sep 2012 11:05 PM |
So I have this Login System and I want it to save the login info. But it isn't returning any errors or informations and it's not working.
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:wait() script.LoginSystem:Clone().Parent = player.PlayerGui wait() player:WaitForDataReady() player:LoadString("p") player:LoadString("u") msg = Instance.new("Message", player.PlayerGui) msg.Text = "Pass: " .. player.PlayerGui.LoginSystem.Code.Value .. ", Username: " .. player.PlayerGui.LoginSystem.Username.Value end)
game.Players.PlayerRemoving:connect(function(plr) if plr.DataReady then plr:SaveString("p", player.PlayerGui.LoginSystem.Code.Value) plr:SaveString("u", player.PlayerGui.LoginSystem.Username.Value) end end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Sep 2012 11:13 PM |
| God do I hate Scripting Helpers at night. So sllllllllooooooooowwwwwwwwwww |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
| |
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 01 Oct 2012 10:54 AM |
You loaded them, but you didnt use them to do anything. Example;
local text = p:LoadString("u")
print(text)
That will do something with the thing loaded. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2012 03:43 PM |
@awas, "But it isn't returning any errors or informations" can you not read?
@jobro, I'll try that thanks |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2012 04:12 PM |
| Doesn't work still and still doesn't have any errors. |
|
|
| Report Abuse |
|
|
zamsongod
|
  |
| Joined: 05 Dec 2008 |
| Total Posts: 109 |
|
|
| 01 Oct 2012 04:24 PM |
| You cannot save after PlayerRemoving is called as it will miss it's timing. Use while wait() do or Changed() instead. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2012 04:32 PM |
| Yeah I was wondering why PlayerRemoving is listed in the Data Persistence tutorial. Thanks :D |
|
|
| Report Abuse |
|
|
| |
|