Hey there,
I am making a game but i want to check if the player is 13 or older. How could I do that?
Hey there,
I am making a game but i want to check if the player is 13 or older. How could I do that?
I’m not sure if this is relevant but:
I’m pretty sure you can create a Age Restriction to your game by going to the Creator Dashboard, Your game, then pressing on Questionnaire, from there you have to enter details about your game for it to determine what Age Restriction it should be.
Other than that, I’m not sure why you would want to know the Player’s Age (unless Account Age, in which you do Player.AccountAge
), Kind of weird don’t you think?
for some reason I am not able to perform the Age Restriction form in the creator dashboard. I would like to know if the player’s account has <13 as an extra prevention
I don’t believe so as that is Private Information,
Depending on what Birthday they set, There isn’t a real way to check if they are 13 or younger.
For Example, someone may have been born on lets say: January 25th, 2014
, But they can change their Birthday to something like: December 12th, 1980
They are able to bypass the Age Restriction like that
However on the Topic of the Questionnaire, I believe you would have to wait a while or modify your game a bit for you to be able to do so, Here is what the Page will look like if you do get access:
(Random Experience btw)
edit 1: experience are public
To my knowledge I don’t think there are official APIs to achieve this. However, you might fight luck with hacky methods. Ethically speaking I’d advise against this and question your use case, categorizing players by age could be somewhat of a red flag.
If you’re looking to filter this based on showing in game things for 13+ users, (ie. Twitter handles for twitter codes), you might find luck with PolicyService. To my knowledge, only 13+ users have access to view Discord links, twitter links and other links on Roblox so this may work for your use case anyways.
Here is a link to PolicyService.
Here is a bit of example code.
local PS = game:GetService("PolicyService")
game.Players.PlayerAdded:Connect(function(plr)
local success, res = pcall(function()
return PS:GetPolicyInfoForPlayerAsync(plr)
end)
if success and res then
local ExtLinkTable = res["AllowedExternalLinkReferences"]
if #ExtLinkTable == 0 then
print("Player can't view external links.")
else
print("Player can view some or all external links.")
end
else
warn("Something went wrong with getting policy information for "..plr.Name)
end
end)
Please keep in mind if you’re using this for explicitly telling if a player is 13+, it may be inaccurate at times as players in certain regions can’t view external links regardless of age, or the age is set higher.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.