Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make an age limit for a game? Where do I put the script?

Asked by 5 years ago
game.Players.PlayerAdded:Connect(function(plr)
    if plr.AccountAge == -2000 then
        plr:Kick()
    end
end)
0
put it somewhere random BashGuy10 384 — 5y
0
uh... regular script i guess..? greatneil80 2647 — 5y

1 answer

Log in to vote
1
Answered by
royaltoe 5144 Moderation Voter Community Moderator
5 years ago
Edited 5 years ago

the following code says: if the player is over 2000 days old, kick them put it in a normal script in the workspace

game.Players.PlayerAdded:Connect(function(plr)
    if plr.AccountAge >= 2000 then
        plr:Kick()
    end
end)
Ad

Answer this question