This is a yes or no question (I DO NOT WANT A SCRIPT)
✓ ANSWER ACCEPTED
Is there a script that doesnt allow users to join your game if they join like days ago ?
2 answers
✓ Accepted answer
Yes. Use Player.AccountAge and kick them if this value is below a sufficient threshold.
Players have a property accessible using: Player.AccountAge, just use a 'if' statement and kick them out if the 'if' statement returns false.
Local Script Example:
player = game:GetService("Players").LocalPlayer -- not really needed but I just added this for no particular reason unless you want to put a player variable instead from the function without the need of creating a variable like this
minimumage = 10
game:GetService("Players").PlayerAdded:connect(function() -- when a player joins the game
if player.AccountAge >= minimumage then
print("Enter!")
else
player:Destroy() -- this shuts down the player, thus he is kicked
end)
Regular Script Example:
minimumage = 10
game:GetService("Players").PlayerAdded:connect(function(player) -- when a player joins the game
if player.AccountAge >= minimumage then
print("Enter!")
else
player:Destroy() -- this shuts down the player, thus he is kicked
end)
>= means greater than or equal to, by the way.
3 comments
0
I know you didn't want scripts but these are EXAMPLES of how they are used if needed.
0
Ok thanks for the script, I tried my friends one and it didnt work. Where do i place the script ?
0
Choose one of the scripts,. place it anywhere like Workspace. Don't put it in ServerStorage.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks