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: Linked Leaderboard stats reset?

Previous Thread :: Next Thread 
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
27 Aug 2014 05:00 PM
local players = game.Players:GetChildren()
for i=1,#players do
if players[i]:FindFirstChild("leaderstats") ~= nil then

if players[i].leaderstats.findFirstChild("KOs") ~= nil then
players[i].leaderstats.KOs = 0
end
if players[i].leaderstats.findFirstChild("Wipeouts") ~= nil then
players[i].leaderstats.Wipeouts = 0
end
end
end




Does anyone know why this isn't working?

("because its wrong" is unhelpful)

Thanks :D
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
27 Aug 2014 05:03 PM
leaderstats.findFirstChild

Use : instead of .

leaderstats:findFirstChild

------------

players[i].leaderstats.KOs = 0

KOs is an object, you should try to change its value instead.

players[i].leaderstats.KOs.Value = 0

Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
27 Aug 2014 05:05 PM
i love you thanks c;
Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
27 Aug 2014 05:05 PM
I can't believe I made that mistake XD

thanks for the help though c;
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
27 Aug 2014 05:06 PM
Glad I could help!
Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
27 Aug 2014 05:15 PM
oh noes D:

local players = game.Players:GetChildren()
for i=1,#players do
if players[i]:FindFirstChild("leaderstats") ~= nil then

if players[i].leaderstats:findFirstChild("KOs") ~= nil then
players[i].leaderstats.KOs = 0
end

if players[i].leaderstats:findFirstChild("Wipeouts") ~= nil then
players[i].leaderstats.Wipeouts = 0
end
end
end



It still doesn't seem to work

(this time I checked if I made any silly errors c;)

Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
27 Aug 2014 05:16 PM
players[i].leaderstats.KOs = 0

i told u bro
i told u about da value
it keep hapening

players[i].leaderstats.KOs.Value = 0
Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
27 Aug 2014 05:22 PM
Whups lel

I should have been double checking your post rather than the script 3;

anyway, thanks c;


love +5
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