New SetCore Methods for prompting social actions

New SetCore methods:

StarterGui:SetCore("PromptSendFriendRequest", Player)
StarterGui:SetCore("PromptUnfriend", Player)
StarterGui:SetCore("PromptBlockPlayer", Player)
StarterGui:SetCore("PromptUnblockPlayer", Player)

These methods can be used to prompt a user to send someone a friend request, or block them. One example of where you might use this is in custom leaderboards, where you could allow a user to friend or block another user. You should only call these methods after a users has already expressed a desire to take the action.

Once prompted to send a friend request, the following confirmation dialog will appear.
image

New GetCore methods:

BindableEvent StarterGui:GetCore("PlayerBlockedEvent")
BindableEvent StarterGui:GetCore("PlayerUnblockedEvent")
BindableEvent StarterGui:GetCore("PlayerMutedEvent")
BindableEvent StarterGui:GetCore("PlayerUnmutedEvent")
BindableEvent StarterGui:GetCore("PlayerFriendedEvent")
BindableEvent StarterGui:GetCore("PlayerUnfriendedEvent")
int[] StarterGui:GetCore("GetBlockedUserIds")

These new GetCore events can be used to perform an action whenever a user blocks or friends someone. For example, you might want to make a user not see messages from a user they have blocked in your custom chat system.

85 Likes

Please tell me this has some sort of floodcheck to it?

4 Likes

Even if it doesn’t, would it be an issue in the first place? I wouldn’t see how it’d be any different than a game that constantly prompts you to purchase items. If it’s spammed by the place developer, leave and downvote.

4 Likes

We may have to revisit this in the future if it becomes a problem, but most developers will want to use the feature responsibly and in a manner that improves player experience. I think this is equivalent to a game that prompts you to purchase items that you never asked to purchase or prompts purchase every 30 seconds.

3 Likes

But it’s kind of hard to detect, right? Let’s say I get a friend request from a bunch of people in a game. I wouldn’t assume that the developer of the game sent those requests; I would assume the other users did.

Of course, pretty harmless still since they can easily be declined or whatever.

There is a confirmation prompt when you call PromptSendFriendRequest. The user must confirm that they want to send the friend request. The scenario I am talking about it when this prompt pops up on your screen asking do you want to send a random user a friend request every 30 seconds.

3 Likes

Ok, that’s great!

1 Like

Does this mean the player-list is going to be getting a port to LocalScripts too?

1 Like

I added these methods to the wiki’s SetCore page:
http://wiki.roblox.com/index.php?title=API:Class/StarterGui/SetCore#PromptSendFriendRequest

3 Likes

We don’t have any current plans.

1 Like

Any way to check which users the current player has muted in the game server, and a way to follow/unfollow other users (as well as check followings/followers)?

Looking into making a custom playerlist, and these are really the only features I see missing from this update.

If you can’t connect to the event immediately, you could get which speakers are muted from the chat. The event also won’t fire when speakers are muted from the /mute command in the chat, so this might even work better.

I think we could possibly add support for following to this in the future.

2 Likes

Any plans to add a prompt for reporting a player?

3 Likes

This is still vulnerable to the scam that @HoudiniDev and @DurstAuric posted about - https://twitter.com/DurstAuric/status/813086763237470208 (for non-members)

On a different note - is there any plan to add Group actions? Such as Prompt to Join a Group or Clan?

7 Likes

Also, can you add an IsFollowing function to Player?

3 Likes

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