Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it possible to save a Players spot?

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

✓ Accepted answer

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.

3 comments

0

For saving player data (and not needing it when the player isn't in-game) use data persistence.

1

Use SaveInstance and LoadInstance for this. Or use SaveNumber and LoadNumber (to safe each individual axis-value, x, y and z.)

1

You could use DataStore if you wanted to create a global leaderboard of player's heights.

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.