I’ve been working on a game and I’m wanting to have my Discord invite publicly available to those of an old enough age to have Discord. The issue is, all the rulings I’ve found referencing doing this refer to a deprecated API Check that now always returns an empty array.
Does anyone have experience with this and what I should ideally do?
Current Code:
local Players = game:GetService(“Players”)
local player = Players.LocalPlayer
local PolicyService = game:GetService(“PolicyService”)
local label = script.Parent:WaitForChild(“DiscordLabel”)
label.Visible = false
local success, policyInfo = pcall(function()
return PolicyService:GetPolicyInfoForPlayerAsync(player)
end)
if success and policyInfo then
local isRestricted = policyInfo.IsSubjectToChinaPolicies
label.Visible = not isRestricted
else
label.Visible = true
end
