How do I tell how many friends are invited through :PromptGameInvite() once it's closed?

first post on devforum so hopefully I’m doing this right

I recently ran into this problem trying to make a system that gives players a certain amount of currency for each player they invite through :PromptGameInvite(). I looked everywhere (here, documentation, videos, etc.) but couldn’t figure out how this could be done.

I tried using the SocialService.GameInvitePromptClosed event, which is supposed to return a table of “recipientIds,” and looped through it so that for every Id it returned, it would fire a remoteevent that gives the player a # of currency. however, each time I tested it, it would either return an empty table or a table with just one InviteMessageID from the ExperienceInviteOptions I used in the :PromptGameInvite() function, even when I invited multiple players. (I believe I also saw in another thread on here that the recipientIds argument is deprecated or broken)

any help or ideas would be greatly appreciated, thank you!


True, no longer used.

Shouldn’t that be done after the invited player has joined? Players could have lots of friends, use them to get a lot of rewards, and there’s a chance you wouldn’t see any new players still.

When a player joins, you can collect LaunchData which includes the sender ID as well. It’s part of the table player:GetJoinData() returns.


thank you for your reply, I was planning on doing that, but I felt that there was more incentive to invite friends if the currency was awarded instantly, and more invites = more possible players. I could be totally wrong though because I don’t have much experience with game analytics or marketing. I’ll wait and see for more responses, and if there’s no way to really see how many invites are sent then I’ll just give the reward when a friend actually joins.

would it still be possible to give the player who sent the invite currency (leaderstat) if they’re not in game so they don’t have to wait for the invitee to join? (i.e. player sends invite, 5 minutes later they leave, 1 minute later invitee joins, JoinData stuff goes off and changes the currency leaderstat of the inviter)


I see. Unfortunately, that appears to be no longer possible. Even confirming whether player sent an invite to anyone at all. Hopefully there’s a small chance I’m wrong.

Meanwhile, a reward system should require some work on player’s end, with the goal of creating a stable player base in mind. If we introduce daily rewards, we’re encouraging players to join every day. That requires some effort on their part. The same applies here. Anyone could invite other friends. But only those who actually brought new players deserve the reward. I haven’t seen a game giving upon invite itself.

Absolutely. You can use the join data to find the sender’s ID. Afterwards, increment their money worth by the reward value in the data store. ProfileService is great for this. And I think you’ll also have to save the invitee’s ID as well as check if the invitee has ever visited the game before, so that the reward is given for each newcomer only.

1 Like

I see, I’ll keep all of this in mind when I work on it again tomorrow, and yeah hopefully they add more events in SocialService to tell when and how many invites are sent

it wasn’t exactly what I was hoping for, which is on roblox, but I really appreciate your responses and I thank you for explaining the alternate solution. have a nice day/night!


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