I'm making this to where it kicks the player when they're not in that certain age. It's not kicking the player, how come?
function OnEntered(Player)
if Player.AccountAge <= 20 then
local Player = game.Players:GetPlayerFromCharacter(Player.Parent)
Player:Kick("Your account must be 20 days old to play.")
end
end
game.Players.PlayerAdded:connect(OnEntered)

3 comments
why do you have did you made a player variable if you already had the parameter?
why do you have did you made a player variable if you already had the parameter?
i think you should delete the player variable