How to close the invite friends pop-up?

So I have created an invite friends button. I was wondering how to close the pop-up or if it even is possible. I have tried numerous times, but all ending not successful.

Here is my script:

function onButtonPressed()
local Success, result = pcall(function()
if status.Value == false then
status.Value = true
return SocialService:CanSendGameInviteAsync(player)
end)
if not s then
print(e)
end
end
end)

if result == true then
    SocialService:PromptGameInvite(player)
end

end

button.MouseButton1Click:Connect(onButtonPressed)

2 Likes

Im pretty sure if u just press the air or something like that it goes away or there is a X button.

I was wanting to create my own button to close it.

Oh ok, well u can put a X button in position and when a player clicks something the friends thing will appear and the X button will apear.

So the pop-up is roblox made. So they can invite their friends to join via their chat. I can’t figure out how to close the pop-up. It isn’t just a gui that you can enable and disable.

3 Likes