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
|
  |
| Joined: 15 Dec 2012 |
| Total Posts: 534 |
|
| |
|
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
|
  |
| Joined: 23 Dec 2010 |
| Total Posts: 1350 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 23 Dec 2010 |
| Total Posts: 1350 |
|
|
| 04 Sep 2014 07:51 PM |
| It's not a LocalScript, right? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|