How do I make you have to have an account that’s older than 10 days to join the game script?
I’ve seen a lot of game do this but I don’t know how?
4 Likes
You can get a players account age using player.AccountAge
game:GetService("Players").PlayerAdded:Connect(Plr)
if(Plr.AccountAge < Required)then
Plr:Kick("Return In "..tostring(Required - AccountAge))
end;
end)
1 Like
local minimumAge = 10
local kickMessage = "Your account must be at least "..minimumAge.." days old to play this game."
game.Players.PlayerAdded:Connect(function(player)
if player.AccountAge < minimumAge then
player:Kick(kickMessage)
end
end)
Script that checks player account age and kicks player if account is less than ten days old. This script was taken from the game Lua Learning by boatbomber.
2 Likes