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

I need help with Data Stores?

Asked by 8 years ago

Is there a way to make it so that when you play your in a location. Then you stop playing and when you play late your in the same location rather than spawn like apocalypse rising.

0
I think you can do that by storing the vector value of the player location and teleporting (by changing the CFrame of) the player to the stored value. GoldenPhysics 474 — 8y

1 answer

Log in to vote
0
Answered by
legosweat 334 Moderation Voter
8 years ago

Perhaps this may help;

Well, this is a simple task, just by saving the CFrame or Vector3, depends what kind of map it is. If you don't want them to get stuck in something, use Vector3.

When the player leaves the game, you should make a player-removing event or a auto-saver. Auto-savers are more efficient though.

I'd read this wiki page about saving data through Data Stores to get you more of an idea; http://wiki.roblox.com/index.php?title=Saving_Player_Data

Once they leave, you'd want to save code that'll basically save their inventory and position.

For saving instances, you'd probably want to have booleans. So if they do not have a sword for example, it'll set it to false and not give him the sword when he joins again.

Another example is saving the names of the items in your inventory, and it'll generate whichever item is in the string.

Anyways, hope this helps.

Ad

Answer this question