Warning messages from SocialService, how do I fix this?

image

I got these errors when I use this script:

local success, message = pcall(function()
	SocialService:PromptGameInvite(player)
end)

I’m not sure how to remove those warnings.

Is this only happening when you test this in studio?

No, this happens in-game as well.

what is the player variable? if its a userid that won’t work

The game invite UI does work and appears. It just throws that warning message.

well then i d k, i was just guessing because it said attempt to index nil, with a number that looks like a userid

The error comes from a Roblox code I’m sure