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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Leaderboard problems

Previous Thread :: Next Thread 
Zelphurx is not online. Zelphurx
Joined: 15 Dec 2012
Total Posts: 534
04 Sep 2014 06:10 AM
What am I doing wrong here? I have this script in Workspace, but it isnt working.

game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model", player)
leaderstats.Name = "leaderstats"

local money = Instance.new("IntValue", leaderstats) --We instance a new IntValue as a child of 'leaderstats'
money.Name = "Points" --this is the name you want the leader-stat to be when it shows up in-game.
money.Value = 0 --this is the value of money the new player starts out with. To change this, you can add some more code (shown later)
end)
Report Abuse
Zelphurx is not online. Zelphurx
Joined: 15 Dec 2012
Total Posts: 534
04 Sep 2014 06:17 AM
Bump
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
04 Sep 2014 06:39 AM
game.Players.PlayerAdded:connnect(function(p)
local l = Instance.new("IntValue", p);
l.Name = 'leaderstats';

local a = Instance.new("IntValue", l);
a.Name = 'Points';
end);
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
04 Sep 2014 06:39 AM
Oh and a.Value = 0;
Report Abuse
Zelphurx is not online. Zelphurx
Joined: 15 Dec 2012
Total Posts: 534
04 Sep 2014 03:41 PM
Hmm.. this didnt work.

game.Players.PlayerAdded:connnect(function(p)
local l = Instance.new("IntValue", p);
l.Name = 'leaderstats';

local a = Instance.new("IntValue", l);
a.Name = 'Points';
a.Value = 0
end);
Report Abuse
Zelphurx is not online. Zelphurx
Joined: 15 Dec 2012
Total Posts: 534
04 Sep 2014 03:43 PM
Am i putting it in the wrong place? I put it into Workspace.
Report Abuse
BroskiiJesse is not online. BroskiiJesse
Joined: 16 Feb 2014
Total Posts: 15
04 Sep 2014 05:56 PM
Not 100% sure but I think Leaderboard and most visual scripts go into a StarterGui folder
Report Abuse
FIares is not online. FIares
Joined: 07 Nov 2010
Total Posts: 641
04 Sep 2014 05:57 PM
Try removing all of those ;'s, they're unneded
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
04 Sep 2014 07:51 PM
It's not a LocalScript, right?
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
04 Sep 2014 08:11 PM
game.Players.PlayerAdded:connect(function(p)
stats = Instance.new("IntValue", p)
stats.name = "leaderstats"

stat0 = Instance.new("InvValue")
stat0.Name = "Potato"
stat0.Value = 999921

stat0.Parent = stats

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