Invite Friends Brick and Mortar?

How would I use SocialService to prompt the invite friends tab by using a collision detector A.K.A. .Touched?

Do you mean:

local socialService = game:GetService("SocialService")

part.Touched:Connect(function(object)
   if Object.Parent:FindFirstChild("Humanoid") then
      local Player = game.Players:GetPlayerFromCharacter(object.Parent)
      if Player then
         socialService:PromptGameInvite(Player)
      end
   end
end)

I assume part is the part you want this event to occur on. You can obviously do it on the client, with remotes, etc.

1 Like