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

Kick player under 30 days since sign up?

Asked by 4 years ago

I need a script help kick player under 30 days since they sign up in order to prevent scammer and Bots. Just like how Steve's One Piece did in the game>

0
Sorry this isn't a request site, for scripts. At least provide something. So we then know how help. ;) j_osephx 3 — 4y
0
player.AccountAge DeceptiveCaster 3761 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

put this in a server script:

local MIN_ACCOUNT_AGE = 30;
game.Players.PlayerAdded:Connect(function(player)
    if(player.AccountAge < MIN_ACCOUNT_AGE) then
        player:Kick()
    end
end)
0
Server script = serverscriptservice? User#30241 0 — 4y
0
a server script is a script that runs on the server.. a LocalScript runs on the players computer User#23252 26 — 4y
Ad
Log in to vote
-1
Answered by 4 years ago

Put this in a Local Script:

if game.Players.LocalPlayer.AccountAge < 30 then
    game.Players.LocalPlayer:Kick('Accout too young!')
end
0
won't work in local script User#23252 26 — 4y
0
you have to put it in starter gui JOSIMA33 -2 — 4y
0
Can work in local script but it's better to do it on server karlo_tr10 1233 — 4y

Answer this question