How can I achieve this?

Hey !
I was wondering how can I achieve this :
A button that send a message on the Roblox website to a friend !
Have a nice day !

1 Like

You could achieve this with HTTPService, and a roblox api proxy…

Do you want it so one bot account will send a roblox PM to the person who clicked the buton? or…

1 Like

I guess he’s trying to make a custom invite message.

Also nice name bro.

1 Like

The friend choose by the player will receive a message with a code and the link of the game !

You can do this with == SocialService ==, PromptGameInvite, CanSendGameInvite, etc

local Social = game:GetService("SocialService")
local plr  -- has to be a instance!

Social:PromptGameInvite(plr)

Or, for a secure approach:

local prompts = {}
prompts.allowed = function(player : Instance)
    local r, can = pcall(Social:CanSendGameInviteAsync(player))
    return r and can
end

prompts.prompt = function(player : Instance)
    local r, c = pcall(Social:PromptGameInvite(player))
    return r and c
end

local function PromptInvite(player : Instance)
    local success = prompts.allowed(player)
    if success then
    local prompted = prompts.prompt(player)
    return prompted
    end
end
1 Like

^^

1 Like

It will only send an invitation of the game, no ?

I need help please, if you got the answer !