gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 06:17 AM |
game.Players.PlayerAdded:connect(function(newPlayer) newPlayer:WaitForDataReady() local pin = newPlayer:LoadInstance("Pin", newPlayer.Pin)
local function sChange(val) newPlayer:SaveInstance("Pin", newPlayer.Pin) end newPlayer.Pin.Changed:connect(sChange) end)
--Output: Pin is not a valid member of Player. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
|
| 22 Apr 2013 06:56 AM |
game:GetService("Players").PlayerAdded:connect(function(Player) Player:WaitForDataReady() local Key,Error = pcall(function() return Player:LoadInstance("Pin",newPlayer.Pin) end) if Key then --> Place what ever you want here end end) |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:25 AM |
| That just left me with the same error as above. |
|
|
| Report Abuse |
|
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
|
| 22 Apr 2013 07:28 AM |
Opps, stop trying to parent it in PLayer.Pin Does Player.Pin exist? |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:37 AM |
| I got rid of the error but, now the Instance just doesn't load. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
|
| 22 Apr 2013 07:28 PM |
| Which line does it say that pin doesn't exist? I know you got rid of the error but that doesn't solve anything as now the instance doesn't load. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:35 PM |
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() -->player:LoadNumber("Pin") end)
game.Players.PlayerAdded:connect(function(Player) if Player.DataReady then Player:WaitForChild("Pin").Changed:connect(function(val) Player:SaveNumber("Pin", val)
end) end end) |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 22 Apr 2013 07:39 PM |
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local a = player:LoadNumber("Pin") local leaderstats = Instance.new("StringValue", player) leaderstats.Value = "MrChubbs is a pwnicorn" local Pin = Instance.new("IntValue", player) Pin.Name = "Pin" Pin.Value = a end)
game.Players.PlayerRemoving:connect(function(Player) player:WaitForDataReady() if Player.DataReady then Player:SaveNumber("Pin", Player.Pin.Value) end end) |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 07:49 PM |
| Still doesn't save/load. and not output. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 22 Apr 2013 07:53 PM |
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local a = player:LoadNumber("Pin") local leaderstats = Instance.new("StringValue", player) leaderstats.Value = "MrChubbs is a pwnicorn" local Pin = Instance.new("IntValue", player) Pin.Name = "Pin" Pin.Value = a end) game.Players.PlayerRemoving:connect(function(Player) Player:WaitForDataReady() if Player.DataReady then Player:SaveNumber("Pin", Player.Pin.Value) end end)
Try now. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 22 Apr 2013 08:08 PM |
| Nope. No output and it doesn't save/load. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|