Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is it possible to save a Players spot?

Asked by 10 years ago

I am making a "Climb 14,000 Stairs" Obby, and it actually has 13,900 + Stairs. I was wondering, if it was possible that when a Player leaves, it saves where the Player's location is?

2 answers

Log in to vote
4
Answered by 10 years ago

There is quite a simple way to do this, you could either use DataStore or DataPersistence to save the Torso's CFrame/Vector3. When you load the Vector3/CFrame of the Torso, you should place the Torso at that position and the player should be able to carry on from his original position.

Hope I helped.

0
For saving player data (and not needing it when the player isn't in-game) use data persistence. User#2 0 — 10y
1
Use SaveInstance and LoadInstance for this. Or use SaveNumber and LoadNumber (to safe each individual axis-value, x, y and z.) TheMyrco 375 — 10y
1
You could use DataStore if you wanted to create a global leaderboard of player's heights. RaverKiller 668 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

A way you can do this that has the lowest chance of failure is using 3 things with the saving. You would use something like.

Player:SaveNumber("SaveX",Character.Torso.X)
Player:SaveNumber("SaveY",Character.Torso.Y)
Player:SaveNumber("SaveZ",Character.Torso.Z)

Answer this question