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: Player List

Previous Thread :: Next Thread 
KillahBuilder is not online. KillahBuilder
Joined: 22 Jul 2014
Total Posts: 105
25 Jul 2014 01:20 PM
I've done a bit of searching on google and couldn't seem to find out how to make it so theres another cateogry. I'm making a tycoon and I'm trying to figure out how to make a row that says Cash in the Player List.
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
25 Jul 2014 01:22 PM
stats = {"Score", "Wins"} --Change Stat, feel free to add more.
game.Players.PlayerAdded:connect(function(p)
local l = Instance.new("Model", p)
l.Name = "leaderstats"
for _,v in pairs(stats) do
local stat = Instance.new("IntValue", l)
stat.Name = v
stat.Value = 0
end
end)
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
25 Jul 2014 01:23 PM
you can add more or edit them
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
25 Jul 2014 01:23 PM
http://lmgtfy.com/?q=roblox+player+list+cash

Second result dude.
Report Abuse
KillahBuilder is not online. KillahBuilder
Joined: 22 Jul 2014
Total Posts: 105
25 Jul 2014 01:27 PM
Was wondering what are the p's for like function(p)
Report Abuse
KillahBuilder is not online. KillahBuilder
Joined: 22 Jul 2014
Total Posts: 105
25 Jul 2014 03:03 PM
Bump nvm about the function questioned I was just being dumb. But where do I put this script into?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
25 Jul 2014 03:05 PM
@Leg
y u no



local Stats = {
{"Int", "Test1", 1},
{"Int", "Test2", 2},
{"String", "rank", "swag"}
}

function newPlayer(Player)
local leaderstats = Instance.new("IntValue")
leaderstats.Name = "leaderstats"
for _, x in pairs (Stats) do
local Stat = Instance.new(x[1] .. "Value")
Stat.Name = x[2]
Stat.Value = x[3]
Stat.Parent = leaderstats
end
leaderstats.Parent = Player
end

Game.Players.PlayerAdded:connect(newPlayer)
Report Abuse
KillahBuilder is not online. KillahBuilder
Joined: 22 Jul 2014
Total Posts: 105
25 Jul 2014 03:07 PM
Thanks so much for the reply, but where do I put the script. Like in the workspace or what? Sorry I'm so beginner at scripting :(
Report Abuse
KillahBuilder is not online. KillahBuilder
Joined: 22 Jul 2014
Total Posts: 105
25 Jul 2014 03:09 PM
Lol derp okay it works when I just put in worksapce. Is there any benefit in using urz instead of Legs, 128? Cuz legs seems more simple.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
25 Jul 2014 03:09 PM
ServerScriptStorage
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
25 Jul 2014 03:12 PM
You can put it in workspace but serverscriptstorage is better


Benifits of mine

local Stats = {
{"Int", "Test1", 1},
{"Int", "Test2", 2},
{"String", "rank", "swag"}
}

You can set the type of value (Int, String, Number)
Int means a non decimal number
String is words
Number is any number

You can set the name (Like in his)

And set the value it starts at

Example

local Stats = {
{"Int", "Gold", 100},
{"Int", "Money", 50}
}

Will make them start with 100 Gold, and 50 Money
Report Abuse
KillahBuilder is not online. KillahBuilder
Joined: 22 Jul 2014
Total Posts: 105
25 Jul 2014 03:22 PM
Ah okay thanks 128. Just for knowledge sakes, could you help me understand the lines i put -- next to?

stats = {"Money"}
game.Players.PlayerAdded:connect(function(p)-- is function(p) some default thing?
local l = Instance.new("Model", p) -- is this creating a model, and is the p the name for it or something? also why is it creating a model for.
l.Name = "leaderstats" -- why do you need to name it is
for _,v in pairs(stats) do -- i know what for loops are but this is weird cuz normally is like for i = 1, < 10, ++ or atleast thats how it is in java. i dont get the syntax in this certain one.
local stat = Instance.new("IntValue", l)
stat.Name = v -- not sure why you gotta name this cuz I thought its already named as Money.
stat.Value = 0
end
end)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
25 Jul 2014 03:24 PM
Oh and also Legs script doesn't work
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