Title explains itself. I’m planning to place the link on a billboard that says something along the lines “want to report a hacker, a bug, or just have an idea for the game? join our community server [link]”
You can’t, this violates TOS. As an alternative you need to add in a report section in your game and send the message to Discord via apis
Thanks for the answer, but can I just write that the discord server is in the game description as a social link?
I don’t think so, it might direct under 13 users off platform and it is better safe than sorry. Just use social links and apis for this
Got it. Thank you for the help.
EDITED 11/4/23
The code should be used to set the link, not set the hidden text. That way the link is not on screen at all.
The solution you marked is not correct. You can use PolicyService to inquire if a player is allowed to see discord links. From there, either show, or dont show the link to the player. Do it in a local script so that the players who are allowed to see it can, and those who aren’t allowed cant.
Here is a demonstration:
Code, placed inside StarterPlayerScripts
local guiWithLink = game.Workspace:WaitForChild("Part").BillboardGui--location of the gui
local PolicyService = game:GetService("PolicyService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local success, result = pcall(function()--wrap in a pcall incase of an error
return PolicyService:GetPolicyInfoForPlayerAsync(player)--gets the policy info for a player
end)
if not success then--if there is an error then run this code
warn("PolicyService error: " .. result)
--you should hide the link if there is an error, just in case.
guiWithLink.TextBox.Text = "Hidden"
elseif result.AllowedExternalLinkReferences then--make sure the table was gotten
local links = result.AllowedExternalLinkReferences
if not table.find(links,"Discord") then--check if Discord is not allowed (not in the list)
guiWithLink.TextBox.Text = "Hidden" --hide the link
end
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.