Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to detect if a player is 13 years or under?

Wondering this because I am making a game that is easier for younger players so they do not get frustrated. (that's the goal anyway)

4 comments

1

As far as I know, there is a way to determine account age, but not the actual player's age, as it is private information.

0

^

0

Cheers, out of interest what would a guests account age be? 1 or nil?

0
  1. And a Guest's userId is always less than 0.

1 answer

game.Players.PlayerAdded(function(nP)
nP.CharacterAdded:connect(function(nC) -- connect event to anonymous function
local sg = Instance.new("ScreenGui", nP.PlayerGui) -- create the screengui
sg.Name = "Welcome" -- set its name
local fr = Instance.new("Frame", sg) -- create the frame inside the ScreenGui
fr.Size = UDim2.new(0, 150, 0, 30) -- set its size
fr.Position = UDim2.new(0, 0, 0.5, -15) -- center the frame
fr.Style = "RobloxRound"
local tb = Instance.new("TextButton", fr) -- create a textbutton, put it in frame
tb.Size = UDim2.new(1, 0, 1, 0)
tb.Style = "RobloxButtonDefault"
tb.TextColor3 = Color3.new(1, 1, 1)
tb.Text = "Click here to play"
tb.MouseButton1Click:connect(function(Plr)
	sg:Destroy()
	local agesg = Instance.new("ScreenGui",Plr.PlayerGui)
	agesg.name = Check age
	local agefr = instance.new("Frame",sg)
	agefr.Size = UDim2.new(0,150,0,150)
	agefr.Position = UDim2.new(0,0,0.5,-15)
	agefr.Style = "RobloxRound"
	local agetb =Instance.new("TextButton",agefr)
	agetb.Size = UDim.new(1,0,1,0)
	agetb.Style = "RobloxButtonDefault"
	tb.TextColor3 = Color3.new(1,1,1)
	for i = 10, 0, -1 do
	tb.Text = "Are u 13 or Under?(if yes clickhere)(i)"
	wait()
	end
	if tb.MouseButton1Click:connect(function(Plr)
	-- put ur code here for13-
	else
	-- put ur code here for 13+
 	end
end)
end)
end)
	

Hope THis Helps:D.There maybe some minor mistakes u can solve them urr self.

2 comments

0

I believe this would be easily abused though.

0

but its the only way

This discussion is preserved as it was. New answers, comments, and votes are closed.