How would I check if its the Players Birthday?

Hi,

So in my game I want to Check if the Day the Player is playing on is the Players Birthday, if so, the game will give them a reward, I’m not sure if PolicyService does this or another API, but I was wondering on what should I do here to achieve this goal? I don’t want a Script nor a System. Just a general Idea on where to get started.

Thanks.

1 Like

AFAIK, Roblox doesn’t allow you to determine the users age - the closest you could get was <13 or >13. As you can’t find out age, it is extremely unlikely that they will let you find the player’s Birthday.
So: You can’t.

2 Likes

Oh, That sucks but its also understandable tho, i dont think they would want people to check a players age and possibly print it, thanks tho.

You can check their account’s birthday, however, by adding this code:

local playerBirthday = player.AccountAge % 360
if playerBirthday == 0 then
--code here
end
1 Like

A year is 365 days, not 360, btw

actually, it’s 365.25 days :nerd_face: :nerd_face: :nerd_face: :nerd_face: :nerd_face: :nerd_face: :nerd_face: :nerd_face: :nerd_face:

6 Likes

365 or 366, Don’t forget about leap year

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.