How to join a roblox game with parameters from an external URL?

I am currently working on a code system in Discord that allows users to purchase codes. I want the user to receive a link after purchasing a code. When they click the link, they will automatically join my Roblox game and the code will be automatically filled into the game.

I am envisioning something like this:
https://www.roblox.com/games/gameId/gameName/play?code=avhafg3

However, I am not sure how to implement the part where the code is automatically passed to the Roblox game via the URL.

btw i’m using TypeScript

Thank you very much!

I think it’s a launchdata parameter

1 Like

This could help you.

I would provide code examples with this post, but you’re using TypeScript, which I don’t know just yet

2 Likes

Yes thank you very much! idk it was that easy! :smile:

1 Like