Matchmaking to another place/experience rewards

I’m trying to make a duel game where players join the main experience/game and its a main menu type of game after they press the “duel” button they get teleported to the 1v1 duel place/experience and the loser is determined by whoever dies first like the humanoid rootpart died or leaves the game. That means the winner gets a reward of for example 100 coins and they both get teleported back to the main menu experience after the duel is ended, and the coins are also added to the winner in the main menu experience so they can use it to buy stuff at the store button.

My problem is that i dont know how to implement the coins getting added from the duel place back to the main menu experience so the players can actually spend them, should i use teleport data or something please help.

You can store the player data, including the coins, in a DataStore, which will persist for all the Places.

Datastores have some issues on their own, so if you want a different library (more confusing though), you should check out ProfileStore.

Either way, you just need to store coins in the datastore, and add 100 once the winner is decided. Then save their data, and you can send the players back.

1 Like

I used Data Stores thank you very much, but what if I want to implement skins and animations that the players can buy from the store with the coins so they can use them in the duel experience do i need to use data stores for those too?

It should, so it is also saved.

character limit

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.