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!