How do I script an age limit system in my Roblox game so I can keep bots/exploiters out of my game? I’m asking because I don’t want any bots or exploiters in my game.
local MIN_ACCOUNT_AGE = 2 --/2 days or more to play the game
game.Players.PlayerAdded:Connect(function(player)
if player.AccountAge < MIN_ACCOUNT_AGE then
player:Kick("Your account needs to be at least "..MIN_ACCOUNT_AGE.." days old to play")
end)
I wouldn’t really recommend going this route though.
We cannot spoon-feed you scripts. Show us what you created first, and then we fix it up.
But I really dont know how to script an age limit system…
Than you so much man!
If you don’t you could ask us the method to do it, not write the whole script.
He literally just asked “How do I script an age limit system”, not for anyone to write him one. Someone just replied with a completed script because they wanted to.
Oh well,the fact that it was ‘how can I’ instead of asking for the method would make people think he or she wants the script, not the method
Did I do something wrong? Sorry if I did so!
But I didnt ask him to write the whole script
But I didn’t actually ask for the script… I just asked how I can make one
No, it’s alright. Sometimes we are unaware about a rule on the forum.
My post was just feedback for next time, so you know how to ask for scripting support.
Yay, thank you so much!
Since I am actually a builder, and I cant script and no one is my partner, I asked this so I could make an age limit system.
Got this error when trying the script Expected identifier when parsing expression, got ')'
The code should work now.
local AccountAgeLimit = 5
game.Players.PlayerAdded:Connect(function(player)
if player.AccountAge < AccountAgeLimit then
player:Kick("Your account needs to be at least "..AccountAgeLimit.." days old to play")
end
end)
Alright, thanks man I really appreciate it! Thanks.