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: Why wont this inscreasing money script work?

Previous Thread :: Next Thread 
TutorialBlox is not online. TutorialBlox
Joined: 01 Apr 2010
Total Posts: 1586
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
TutorialBlox is not online. TutorialBlox
Joined: 01 Apr 2010
Total Posts: 1586
27 Dec 2013 05:28 PM
Any ideas?
Report Abuse
TutorialBlox is not online. TutorialBlox
Joined: 01 Apr 2010
Total Posts: 1586
27 Dec 2013 05:32 PM
What could possibly be wrong, it makes no darn sense!
Report Abuse
jd678 is not online. 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
TutorialBlox is not online. TutorialBlox
Joined: 01 Apr 2010
Total Posts: 1586
27 Dec 2013 05:44 PM
That did not seem to work...
Report Abuse
jd678 is not online. jd678
Joined: 18 Apr 2008
Total Posts: 11529
27 Dec 2013 05:46 PM
Worked for me.
Report Abuse
TutorialBlox is not online. TutorialBlox
Joined: 01 Apr 2010
Total Posts: 1586
27 Dec 2013 07:29 PM
what the beep...
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Dec 2013 07:30 PM
Don't test in play solo
Report Abuse
TutorialBlox is not online. TutorialBlox
Joined: 01 Apr 2010
Total Posts: 1586
27 Dec 2013 07:41 PM
I didn't... I test in play...
Report Abuse
TutorialBlox is not online. TutorialBlox
Joined: 01 Apr 2010
Total Posts: 1586
27 Dec 2013 08:00 PM
a
Report Abuse
TheNickmaster21 is not online. TheNickmaster21
Joined: 04 Oct 2008
Total Posts: 9490
27 Dec 2013 08:01 PM
Start a server and then start a player and check for errors.
Report Abuse
ozzzyt is not online. ozzzyt
Joined: 08 Jan 2013
Total Posts: 3576
27 Dec 2013 08:11 PM
Everything!
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