Prompt players to join Communities from in-experience!

Hello creators,

We’re excited to release a highly requested feature for Communities: you can now prompt players to join your Community directly inside your experience, using GroupService:PromptJoinAsync! :tada:

Grow your Community without interrupting gameplay

Communities are a fantastic tool for keeping your players engaged and informed about your experience. Until now, players had to go to a separate browser or leave your experience to join your Community, creating friction and missed opportunities. This update is designed to turn your players into community members.

With the new API, you can trigger a native UI prompt that allows players to join your group with a single click, without ever leaving the game.

This API accepts any valid groupId. For Communities with “Manual Approval” enabled, the player will request to join via the prompt. The UI prompt also respects and informs the player about Join Requirements such as “Verification Level” and “Account Age.”

We’re planning future improvements to the join prompt UI. Let us know if you have any needs or thoughts about this!

How to use the new API

We’ve added a new client-only function to GroupsService:

GroupsService:PromptJoinAsync(groupId: number): Enum.GroupMembershipStatus

When you call this client-side method with a valid groupId, it will display a prompt to the local player and yield until the player makes a choice. The function returns an Enum.GroupMembershipStatus to let you know the outcome.

The possible return values are:

  • Enum.GroupMembershipStatus.Joined: The player successfully joined the Community.
  • Enum.GroupMembershipStatus.JoinRequestPending: The player sent a request to join (for Communities set to have “Manual Approval”).
  • Enum.GroupMembershipStatus.AlreadyMember: The player was already in the Community.
  • Enum.GroupMembershipStatus.None: The player cancelled the prompt or was ineligible to join.

Here’s an example of how you might use it in a client-side script:

local GroupService = game:GetService("GroupService")
-- Copy this from your Community's web URL, e.g.:
-- https://www.roblox.com/communities/1200769/Official-Group-of-Roblox
-- => in this case, the group ID is 1200769
local GROUP_ID = ...

-- This should be done in a script running on the client
local success, result = pcall(function()
    return GroupService:PromptJoinAsync(GROUP_ID)
end)

if success then
    if result == Enum.GroupMembershipStatus.Joined then
        print("Player joined the group!")
    elseif result == Enum.GroupMembershipStatus.JoinRequestPending then
        print("Join request sent")
    elseif result == Enum.GroupMembershipStatus.AlreadyMember then
        print("Already a member")
    else
        print("Did not join or not eligible")
    end
else
    warn("Prompt failed: ", result)
end

Important notes for usage

Client-only

This method must be called from the client. It prompts the local player.

Error handling

The prompt can fail to show for various reasons (e.g., invalid groupId, or intermittent network failures). You must wrap your calls to this method in pcall to handle any potential errors gracefully.

Regarding server-side validation

Before discussing server-side validation, keep in mind that players can freely join or leave Communities at any time, and there’s no guarantee they will remain members. Because of this, it’s best not to attach rewards that are disproportionately high for joining Communities.

In many cases, you may not need to validate membership on the server as strictly as you would for something like purchase validation. Even with correct client behavior, players can trivially join and leave a Community to obtain any “join” rewards at no cost.

That said, if you do want to perform additional server-side validation after showing the player the join prompt, here are some considerations:

Keep in mind that Player:IsInGroup, Player:GetRoleInGroup and Player:GetRankInGroup have a 60 second cache. While we immediately clear the cache on the client that joined the Community through GroupService:PromptJoinAsync, we don’t clear the cache on the server or other clients at this time.

This means that when you fire a signal from the client to the server after the prompt, the server may have an outdated value for that player’s membership.

A common usage pattern could be that you fire a signal from the client to the server after prompt completion to perform some action (like granting awards). There are a few options to ensure the membership is properly validated:

  • Only call Player:IsInGroup on the server once the client indicates they already were / became a Community member, so you guarantee a fresh value.
  • Periodically check for membership using Player:IsInGroup after the client claims they have joined the Community.
  • Use GroupService:GetGroupsAsync to get the latest, uncached Community memberships for a player when they say they have joined via the in-game prompt.

Combine with Open Cloud to manage Communities in-experience

While we don’t have native engine APIs to manage roles or join requests, you can use certain Open Cloud endpoints through HttpService to achieve these use cases from server-sided Luau scripts, including handling join requests and updating members’ roles.

Using these features, you can run all sorts of Community management in-experience in Luau, without your players or collaborators needing to use out-of-experience web pages or tools:

  • You can prompt the player to request to join a Community on the client, and then have your moderators or automated systems process that join request from server-sided Luau scripts.
  • You can change a player’s assigned roles based on in-experience actions the player takes from server-sided Luau scripts.

Ready for use

This feature is now live! Check out the official documentation for more details.

A huge thank you to everyone who has requested this feature over the years, and thank you for your patience. We can’t wait to see how you use it to build and grow your Communities.

As always, please share your feedback with us below, and let us know what you make with this!

Happy holidays :wrapped_gift: :snowman:
- From the Roblox teams working on Communities

332 Likes

This topic was automatically opened after 10 minutes.

A lot of creators have been waiting for this, thank you!

Would the Roblox Team consider adding pretty much last 2 missing and widely requested prompt API methods for:

  1. purchasing a private server,
  2. following/unfollowing a specific player?
64 Likes

This is definitely one of the greatest features added, now mobile / tablet players can join communities without requiring to leave the experience and re-joining (which they may not).

It would be great if :IsInGroup() could also update accordingly, since once it is called, it never changes the return value even if it has been modified.

Thank you for making Roblox a great place for all.

28 Likes

This is something that I’ve thought Roblox should add for a while and it’s finally here absolute w update

13 Likes

thanks for this feature about groups!

14 Likes

This is incorrect actually (I also found this out while working on the code!), the actual cache time is 60 seconds and has been that way for multiple years. We updated the documentation to reflect that it’s periodic and not permanent for a session.

We also updated the client-side such that if a group join prompt completes, it will uncache the membership if it has changed immediately.

40 Likes

W Roblox, thank you for listening HookSmith. I was one of the guys who you responded to when everyone wanted it.

8 Likes

This is incredibly exciting! As an event organizer, I’ll be using this to let our events’ attendees join the communities of participating groups directly from their in-game showcase booths. This’ll be a great way to create a lasting impact with as little friction as possible!

7 Likes

easy to abuse in my opinion, what’s stopping a bunch of bot clients from launching the game and just pressing the join community prompt?

6 Likes

Thanks for sharing the concern. The in-game prompt uses the same action for community joining as the web/app versions of the community page, so that’ll be fine as it has the same protections.

8 Likes

It’s these kinds of cool new features that inspire me to create more experiences in Roblox

9 Likes

Thanks for this, just wish it had been done a lot sooner.

9 Likes

Kids these days have it so good, I remember years ago when I had to setup and host janky javascript web servers for auto-updating group roles lol

17 Likes

I’ll use it in my place to encourage more players to join my group! Thanks for rolling out this update!

7 Likes

This is an amazing update! Now, games like restaurant roleplays can prompt potential staff to join the group without having to create sometimes confusing text/visual guides for that process.

8 Likes

I share @luaClass concern.

This could create significant issues, as bots may bypass Roblox’s prompt to force players into joining groups.

It could also be abused by game owners who require players to join a group in order to continue playing.

There should be clear rules governing how this feature can be used.

7 Likes

Can you send me a DM and tell me in more detail about your concern? I’m not sure I follow from your or luaClass’ post, this concern doesn’t seem impactful as we apply the same anti-botting checks on either kind of community join, so I think you’ll be totally fine. Any captchas etc. are still shown in-experience.

Yeah, I understand that, and creators can also prompt community join randomly at inopportune moments. This is corrected automatically by the algorithm – games that do this will receive more dislikes, players will leave, not spend money, etc.

It’s the same philosophy we follow for RSVP event prompts at the moment.

11 Likes

Significantly less people would play that game then, I would stop playing. Kinda like how some devs prompt people to add the game to favorites. Games that don’t give friction are more likely to be popular.

4 Likes

Finally something good, will definitely be making use of this.

5 Likes