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: Leaderstats script

Previous Thread :: Next Thread 
Drozak is not online. Drozak
Joined: 16 Mar 2013
Total Posts: 41
28 May 2014 02:01 PM
I made this script yet it's not working.

game.Players.PlayerAdded:connect(function(plya)
Z = plyr:findFirstChild("leaderstats")
b = Instance.new("StringValue", plya.leaderstats)
b.Name = "Rank"
b.Value = 30
end)
print("The leaderboard script is working as intended.")

Again, there is nothing nil according to the output. I made a similar script on my main before and people said that leaderstats isn't in the player by default. How would I add it then to the player..?

A signature is not simply a signature.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
28 May 2014 02:02 PM
You add leaderstats into player the same way you add anything into anything. The object's class should be IntValue and name 'leaderstats'.
Report Abuse
Drozak is not online. Drozak
Joined: 16 Mar 2013
Total Posts: 41
28 May 2014 02:04 PM
Alright.

game.Players.PlayerAdded:connect(function(plya)
a = Instance.new("IntValue", plya)
a.Name = "leaderstats"
Z = plyr:findFirstChild("leaderstats")
b = Instance.new("StringValue", plya.leaderstats)
b.Name = "Rank"
b.Value = 30
end)
print("The leaderboard script is working as intended.")

It still didn't work.

A signature is not simply a signature.
Report Abuse
Drozak is not online. Drozak
Joined: 16 Mar 2013
Total Posts: 41
28 May 2014 02:16 PM
b1

A signature is not simply a signature.
Report Abuse
tanlolol12345 is not online. tanlolol12345
Joined: 20 Jan 2012
Total Posts: 20664
28 May 2014 02:19 PM
cant you just insert a leaderstat script and launch from there

I believe its latin for "Skip the boring parts".
Report Abuse
Drozak is not online. Drozak
Joined: 16 Mar 2013
Total Posts: 41
28 May 2014 02:20 PM
I've tried before but all of them don't work anyway so I can't figure out how those work.

A signature is not simply a signature.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
28 May 2014 02:22 PM
test it online
Report Abuse
Drozak is not online. Drozak
Joined: 16 Mar 2013
Total Posts: 41
28 May 2014 02:41 PM
Looked at a few more scripts, even found one that worked and basically stole the whole script and put it in another script yet not working correctly.

game.Players.PlayerAdded:connect(function(P)
local a = Instance.new("IntValue", P)
a.Name = "leaderstats"
local b = Instance.new("StringValue", leaderstats)
b.Name = "Rank"
b.Value = P:GetRoleInGroup(909444)
end)

Is it supposed to be a local script or something?

A signature is not simply a signature.
Report Abuse
SolarFloss is not online. SolarFloss
Joined: 08 Jan 2009
Total Posts: 63
28 May 2014 02:52 PM
game.Players.PlayerAdded:connect(function(P)
local a = Instance.new("IntValue", P)
a.Name = "leaderstats"
local b = Instance.new("StringValue", a)
b.Name = "Rank"
end)


try that.
Report Abuse
Drozak is not online. Drozak
Joined: 16 Mar 2013
Total Posts: 41
29 May 2014 08:33 AM
@Solar,

That one wouldn't have a value though.

A signature is not simply a signature.
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