Hey there! I’ve been testing around with the new SocialService calling feature and I’ve made a quick test, including these scripts:
ServerScript inside ServerScriptService called “Main”:
local SocialService = game:GetService("SocialService")
local TeleportService = game:GetService("TeleportService")
local UserService = game:GetService("UserService")
SocialService.OnCallInviteInvoked = function(_, ids: { string })
local AccessCode = nil
local s, err = pcall(function()
local Caller = ids[1]
local Calling = ids[2]
local CallingName = UserService:GetUserInfosByUserIdsAsync({ ids[2] })[1]
AccessCode = TeleportService:ReserveServer(15382020266)
end)
if not s then warn(err) end
print(s, AccessCode)
return { ReservedServerAccessCode = AccessCode, PlaceId = 15382020266 }
end
And a LocalScript under a TextButton that activates the phone book:
local Players = game:GetService("Players")
local SocialService = game:GetService("SocialService")
local Player = Players.LocalPlayer
local function CanSendCallingInvite(sendingPlayer)
return SocialService:CanSendCallInviteAsync(sendingPlayer)
end
local canCall = CanSendCallingInvite(Player)
if canCall then
script.Parent.MouseButton1Click:Connect(function()
SocialService:PromptPhoneBook(Player, "")
end)
end
The expected result is: The call gets sent and when the receiver accepts the call, they get teleported into the place with the id specified in the script (15382020266)
But what happens is: This message pops up when you start the call and the call fails
The pcall specified in the script also works and returns success with the valid reserved server code as seen here
But calls inside the Roblox Connect experience seem to be working fine.
Have a nice day!
No, that’s not how the API works. It should teleport you into your own place, as stated in the documentation. It is obviously not possible to open a reserved server in another experience.
Hi @changeno! We’ve tried to reproduce the issue on our end, but we’re currently unable to. We’ve incorporated a lot of various fixes since launch so if this is still a problem please let me know. Thanks for the report!
Yes, I went and tried it again and got an error saying the experience must be older than a week. The experience I tried it on is older than a year and seems like other people are having the same problem.
Hi @changeno! Could you try again and see if you’re still running into the same problem? We did some additional investigation and made some changes to address this issue.