game.Players.PlayerAdded:connect(function(plr)
if plr.AccountAge < 30 then
plr:Kick()
end
end)
Nothing happens when a new account joins
game.Players.PlayerAdded:connect(function(plr)
if plr.AccountAge < 30 then
plr:Kick()
end
end)
Nothing happens when a new account joins
If you kick a player too soon, the game doesn't like that. In short, you just have to wait for the Character of the player to spawn first.
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:wait()-- Waits for the character to spawn
if plr.AccountAge < 30 then
plr:Kick()
end
end)
Good Luck!
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
Still didn't work for me
I just tested it. Works fine.
Is the script disabled? And where is it located? Is it a Local Script or a regular one?
It is a regular one and it's in workspace, I do possibly have to note that the character gets removed after he joins immeditaly, other intro stuff and yeah.
That's the point :/
I think you should learn a little bit more about scripting @aaron8888, this script does what your basically asking.