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: leaderboard vip problem?

Previous Thread :: Next Thread 
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Dec 2013 10:38 AM
addtix = {'JimmyChance'}

function findIfAdmin(name)
for i,v in pairs(addtix) do
if string.lower(name) == string.lower(v) then
return true
end
end
return false
end

game.Players.PlayerAdded:connect(function(plr)
local ldr = Instance.new('IntValue', plr)
Ldr.Name = 'leaderstats'
local cash = Instance.new('IntValue', ldr)
cash.Name = 'Cash'
cash.Value = 0
if findIfAdmin(plr.Name) then
stats = plr:FindFirstChild('leaderstats')
if (stats~=nil) then
plrcash = stats:FindFirstChild('Cash')
plrcash.Value = plrcash.Value + 300
end
end
end
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Dec 2013 10:39 AM
for i,v in ipairs instead of pairs. it is an array.
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Dec 2013 10:40 AM
Still having problems. I think it's in the second section, actually.
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Dec 2013 10:41 AM
u need a model called leaderstats first, then the invalue of cash
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Dec 2013 10:43 AM
What do you mean? I'm using this for a tycoon kit.
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Dec 2013 10:46 AM
for leaderstats, u need a model called leaderstats to be inserted into the player, then the intvalue of cash inserted into that.
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Dec 2013 10:47 AM
That is what the second part of the script is supposed to do, unless I did it wrong.
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Dec 2013 10:49 AM
u inserted an intvalue named leaderstats. make that a model named leaderstats. Instance.new("Model",plr)
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Dec 2013 10:53 AM
No, this method should work. There is no need for me to insert a model.
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Dec 2013 10:53 AM
dats how i always insert leaderstats. and it always works.
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Dec 2013 11:00 AM
Is nevermind a real word?

I fixed it, thanks for your assistance.
Report Abuse
domorox17 is not online. domorox17
Joined: 06 Mar 2012
Total Posts: 1710
22 Dec 2013 11:01 AM
never mind is 2 words, and no prob bro
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