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

Can you save teams in a datastore?

Asked by 6 years ago

Is it possible for teams to be saved in a datastore? What if I wanted to make an in-game crew system where you could create a team but when you leave the team saves with all your teammates still saved as well so when you join back it's all still there.

0
What? Please explain more. You want that when you join the game, you join automatically a team or to save some NPCs as your team memebers or to save real ROBLOX players are on a team with you... Explain more please. Aimarekin 345 — 6y
0
Lol i said memebers. I meant members. Aimarekin 345 — 6y
0
I mean there's like a GUI, you can create your own team, or crew then have it be saved so that when you leave and come back you're still on that crew. basicecstasy 122 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Yes.

The biggest problem is where you'll store the team. This depends on what you plan on doing with it. Can the team change? Is there a team leader? Can someone be in 1+ teams?

You might consider storing the team in the team leader's user id (along with the team name, who is in it, and any other relevant information); everyone else's datastore id could have something that means "go look for the team in the team leader's slot; their user id is ____"

If you meant a "crew" with NPCs (instead of players), then this is simple -- the player is the team leader; the crew will never be online without the player, so you don't need to store anything special for your NPCs; so you can just store the crew under the player's user ID.

Ad

Answer this question