概要
robloxでassistantやってみた。
練習問題、やってみた。
練習問題
SocialServiceを使え。
サンプルコード
local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local function canSendGameInvite(sendingPlayer)
local success, canSend = pcall(function()
return SocialService:CanSendGameInviteAsync(sendingPlayer)
end)
return success and canSend
end
local canInvite = canSendGameInvite(player)
if canInvite then
SocialService:PromptGameInvite(player)
print("ok")
else
print("Cannot send invite")
end
以上。