Check for SafeChat?

Hello,

I was looking for a function that can be used to determine whether a player has SafeChat on or off. I thought this was a built-in function, but I can’t seem to find it.

Is this a function, or is there another simple way to do this?

I have looked through the DevHub and DevForum and found nothing.

I assume that Roblox would not openly distribute an account’s age, but I feel as though having a function to show whether safe chat is on or off is not really showing the account’s age, it’s simply showing whether the user is under 13 or not.

If you want to use this for custom filtering you can try to search for it on roblox devhub I am sure you will find it because I already came across it.

I know about the TextService functions, I’m not looking to filter chat, I just want a function that can return true if a player has safechat, or false if they don’t.

This is only thing I’ve found: Player | Roblox Creator Documentation

Or this:

The solution is quoted above (scroll down for the actual response). Don’t read furthermore.

You’d be able to determine that by using a phrase that can only be stated for people over 13, and see if it tags them - assuming they’re under 13.

Player:GetUnder13() is only accessible through CoreScripts - you can’t achieve that. Alongside with PolicyService:GetPolicyInfoForPlayerAsync(), .AllowedExternalLinkReferences may be a solution for this. Let me check.

Huh? I mean you can determine by that if player has allowed social links that means the player is 13+.

That’s really weird solution I would give a shot the thing with allowed link async rather than this.

1 Like

I’m uncertain about that function. It does print out an array of social media they’re able to view, but not a boolean, which confuses me, since there’s nothing in the settings to restrict regarding media (possibly).

The policy could either mean the player can view other player’s external links, or the game’s, but I’m not sure. I think this needs to be tested.

I mean you can still check amount of Instances inside of array so if we can somehow check how it looks like for -13 and +13 account we can possibly get the result that we want to get.

Because outside of that only solution would be the thing you have written but I won’t really do it tbh.

Okay, turns out it works perfectly. Sorry for the confusion.

game.Players.PlayerAdded:Connect(function(plr)
	local policyInfo = game:GetService("PolicyService"):GetPolicyInfoForPlayerAsync(plr).AllowedExternalLinkReferences
	if policyInfo == {} then --if has safechat then
		--code here
	end
end)
3 Likes

It’s okay and thank you for testing that :).

1 Like