Prompting Friend Requests

How can I prompt a user to send a friend request to a specific userId?
I’ve looked up an old post but I don’t quite understand it.
Help would be appreciated.

By the way, Jesus loves you :smiley:

Use google omg. :sob:

game:GetService("StarterGui"):SetCore("PromptSendFriendRequest",otherPlayer)

No, thanks. Not a christian.

@awry_y used the documentation, but maybe it needs some implementation. An example would be:

local StarterGui = game:GetService("StarterGui")

-- You can only send request to player in the same server. See note below.
local function sendFriendRequest(player: Player)
   StarterGui:SetCore("PromptSendFriendRequest", player)
end

Edit: Note that you can’t send a friend request to someone offline or not in the game. So therefore, no use for UserId.

Can I not prompt a user to send a friend request to an specific ID? (that is outside the server)

No, I believe this is to prevent spamming in Roblox systems.

By the way, Jesus loves you :smiley:

Amen, but maybe you should share with caution.

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