generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Aging a player

Previous Thread :: Next Thread 
Jakepoz is not online. Jakepoz
Joined: 16 Feb 2013
Total Posts: 83
21 Feb 2014 09:40 PM
Okay so I am making a new admin script. I want to add a aging command. How exactly would I do that would it be like (Stating v is defined.)

v:GetAge()
Report Abuse
Jakepoz is not online. Jakepoz
Joined: 16 Feb 2013
Total Posts: 83
21 Feb 2014 09:47 PM
Anyone?
Report Abuse
Jakepoz is not online. Jakepoz
Joined: 16 Feb 2013
Total Posts: 83
21 Feb 2014 10:00 PM
bump
Report Abuse
Guest24231 is not online. Guest24231
Joined: 17 Jul 2011
Total Posts: 91
21 Feb 2014 10:08 PM
i think if u do sometin like

game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
msg = string.lower(msg)
if not admins[plr.Name] then return end
if string.sub(msg, 1, 4) == "age/" then
local nub = string.sub(msg, 5)
for i,v in pairs(game.Players:GetPlayers()) do
if string.sub(v.Name, 1, #nub) == nub then
nub = v
break
end
end
if nub ~= nil then
local age = nub:GetAge()
local msg = Instance.new("Hint", plr.PlayerGui)
msg.Text = age
wait(3)
msg:remove()
end
end
end)
end)
Report Abuse
Guest24231 is not online. Guest24231
Joined: 17 Jul 2011
Total Posts: 91
21 Feb 2014 10:08 PM
it mite look ugleh and mite error bcuz i was rushin, and i mite have gon off topic
Report Abuse
Jakepoz is not online. Jakepoz
Joined: 16 Feb 2013
Total Posts: 83
21 Feb 2014 10:09 PM
lol thanks I just needed to know if :GetAge() was right.
Report Abuse
Guest24231 is not online. Guest24231
Joined: 17 Jul 2011
Total Posts: 91
21 Feb 2014 10:11 PM
oh, idk if getage() is rite, i will check
Report Abuse
Andrew1234567mmm is not online. Andrew1234567mmm
Joined: 14 Oct 2009
Total Posts: 691
21 Feb 2014 10:11 PM
GetAge() is a nono

you have to get it from the players properties
Report Abuse
Guest24231 is not online. Guest24231
Joined: 17 Jul 2011
Total Posts: 91
21 Feb 2014 10:12 PM
v.AccountAge
Report Abuse
Kyrothehero is not online. Kyrothehero
Joined: 14 Aug 2012
Total Posts: 306
21 Feb 2014 10:13 PM
#### ###### admin or something
Report Abuse
Guest24231 is not online. Guest24231
Joined: 17 Jul 2011
Total Posts: 91
21 Feb 2014 10:14 PM
its v.AccountAge, brah, I was just using :GetAge() because you said it, lol
Report Abuse
Jakepoz is not online. Jakepoz
Joined: 16 Feb 2013
Total Posts: 83
21 Feb 2014 10:15 PM
@kyro NO I am not using some free model to help me with this game I am making AT ALL!
Report Abuse
Guest24231 is not online. Guest24231
Joined: 17 Jul 2011
Total Posts: 91
21 Feb 2014 10:15 PM
http://wiki.roblox.com/index.php?title=AccountAge_(Property)
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
21 Feb 2014 10:53 PM
print(math.ceil(v.AccountAge/12))
Report Abuse
jonesj627 is not online. jonesj627
Joined: 06 Oct 2010
Total Posts: 1496
22 Feb 2014 12:11 AM

game.Players.LocalPlayer.Chatted:connect(function(msg)
if msg:sub(1,4) == "age/" then
a = Instance.new("Hint",workspace)
a.Text = game.Players.LocalPlayer.Name.." is "..game.Players.LocalPlayer.AccountAge.."days old"
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image