|
| 27 Dec 2013 05:23 PM |
This leaderboard script will not work, I got this from the Roblox wiki so I should not be surprised that it is crap...
local playerStats = {} --this keeps a list of the stats for each player that enters the game game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "leaderstats" local money = Instance.new("IntValue", leaderstats) money.Name = "Money" money.Value = 0 playerStats[player] = leaderstats end) while true do --infinite loop for player, stats in ipairs(playerStats) do stats.Money.Value = stats.Money.Value + 1 end wait(5) end |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2013 05:32 PM |
| What could possibly be wrong, it makes no darn sense! |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 27 Dec 2013 05:37 PM |
local playerStats = {} --this keeps a list of the stats for each player that enters the game
game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("IntValue", player) leaderstats.Name = "leaderstats"
local money = Instance.new("IntValue", leaderstats) money.Name = "Money" money.Value = 0
playerStats[player] = leaderstats end)
while true do --infinite loop for player, stats in ipairs(playerStats) do stats.Money.Value = stats.Money.Value + 1 end wait(5) end
|
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 05:44 PM |
| That did not seem to work... |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 27 Dec 2013 07:41 PM |
| I didn't... I test in play... |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2013 08:01 PM |
| Start a server and then start a player and check for errors. |
|
|
| Report Abuse |
|
|
ozzzyt
|
  |
| Joined: 08 Jan 2013 |
| Total Posts: 3576 |
|
| |
|