|
| 28 Apr 2014 07:39 AM |
game.Players.PlayerRemoving:connect(function(player) player:WaitForDataReady() player:SaveNumber("savez", player.Character.Torso.CFrame.z) player:SaveNumber("savey", player.Character.Torso.CFrame.y) player:SaveNumber("savex", player.Character.Torso.CFrame.x)
end) game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() NZ = player:LoadNumber("savez") NX = player:LoadNumber("savex") NY = player:LoadNumber("savey") NHE = player:LoadNumber("savehealth")
player.Character.Torso.CFrame = CFrame.new(NX,NY + 5,NZ)
end)
it just teleports me to 0,5,0
s ohow would I fix this
|
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 07:43 AM |
| I don't think it is saving, lol |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 07:46 AM |
While I don't think this it the problem, you didn't save the health.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 07:56 AM |
| er I fixed that, by removing load thing, it stil ldoesnt work :/ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 28 Apr 2014 09:45 AM |
game.Players.PlayerRemoving:connect(function(player) player:WaitForDataReady() player:SaveNumber("savez", player.Character.Torso.Position.Z) player:SaveNumber("savey", player.Character.Torso.Position.Y) player:SaveNumber("savex", player.Character.Torso.Position.X) end)
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() player:LoadNumber("savez") player:LoadNumber("savex") player:LoadNumber("savey") --Was never saved z = player:FindFirstChild("savez") y = player:FindFirstChild("savey") x = player:FindFirstChild("Savex")
player.Character.Torso.CFrame = CFrame.new(x,(y+5),z) end) |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 10:00 AM |
Er, the char is gone when the player leaves..
How about a while loop, and a for loop, that saves all the stats Plradded event wait for char.. loadpos.. end
While wait () do iterate thru plrs... check for char.. savethepositions.. end |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 10:04 AM |
that wont work because character is removed befor playerremoving is called
try to create some player stats inside player and update those stats awery 5 sec like
while wait(5)do if player.Character.Torso then player.PositionStats.XSave.Value = player.Character.Torso.Position.X player.PositionStats.YSave.Value = player.Character.Torso.Position.Y player.PositionStats.ZSave.Value = player.Character.Torso.Position.Z end end
and then when playerremoving save those |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 10:05 AM |
| uh sry island didnt see your post |
|
|
| Report Abuse |
|
|