[ENABLED as of May 28] SocialService Game Invites are Live

Thanks for the quick response. I’ll disable my invite system until FollowUserId is added to the Join button flow for invitations.

Will this be supported on gamepads at any time?

3 Likes

Looks cool although you should make it possible so developers can set the message although I understand that this could be abused.

2 Likes

Is it just me or does GameInvitePromptClosed not fire anything in the second argument?


image

I even took the implementation from the wiki and it still won’t work. I did notice a lot of core scripts giving out warnings, which look like this.

local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer

local function canSendGameInvite(targetPlayer)
	local res, canSend = pcall(SocialService.CanSendGameInviteAsync, SocialService, targetPlayer)
	return res and canSend
end

local function promptGameInvite(targetPlayer)
	local res, canInvite = pcall(SocialService.PromptGameInvite, SocialService, targetPlayer)
	return res and canInvite
end

local function openGameInvitePrompt(targetPlayer)
	local canInvite = canSendGameInvite(targetPlayer)
	if canInvite then
		local promptOpened = promptGameInvite(targetPlayer)
		return promptOpened
	end
	return false
end

local function len(t)
	local l = 0
	for _ in pairs(t) do l = l + 1 end
	return l
end

local function invitePromptClosed(senderPlayer, recipientIds)
	print(len(recipientIds))
end

local function inputBegan(input, gameProcessed)
	local inputType = input.UserInputType
	local touch = Enum.UserInputType.Touch
	local mouse1 = Enum.UserInputType.MouseButton1

	if inputType == touch or inputType == mouse1 then
		openGameInvitePrompt(player)
	end
end

script.Parent.InputBegan:Connect(inputBegan)
SocialService.GameInvitePromptClosed:Connect(invitePromptClosed)
3 Likes

But that 4hrs cooldown seem so long and sad if they don’t join, your going to have to wait that 4hrs just to invite someone else.

if you read any of the previous posts by staff you would know that it doesn’t return anything anymore

will GameInvitePromptClosed return an empty table forever or are there plans to change it someday?

1 Like

Any more information now that it’s been 6 months?

No new information has been posted for this feature. If there’s something you’d like to know specifically, I’d recommend asking a more specific question. :slightly_smiling_face:

1 Like

We do not have immediate plans to re-enable this field.

Ideally we would instead provide a signal when someone has joined a game with the person who invited them, however this is currently not possible without some changes in our backend.

I also think this is a good idea. Could you do me a favor and make this it’s own thread for the feature request so it’s easier to track?

3 Likes

Is there any high-level idea of when this would happen? Could this be added to the roadmap?

Following up, I’ve created a feature request for this:

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