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: How to change leaderboard name of leaderboard

Previous Thread :: Next Thread 
zach0arythesniper79 is not online. zach0arythesniper79
Joined: 18 Aug 2011
Total Posts: 211
05 Sep 2013 08:52 PM
I found a script but i wanna make it have a different currency heres the script

function onPlayerEntered(newPlayer)--Standerd LeaderBoard for Tycoons and Money games.
local stats = Instance.new ("IntValue")---Get the leaderboard stats.
stats.Name = "leaderstats"---Right name.
stats.Parent = newPlayer--Put them in the Player.
local Money = Instance.new ("IntValue")---Get the money Value.
Money.Name = "Money"---Name it correctly.
Money.Value = 100---Set it to what you want players to start out with.
Money.Parent = newPlayer.leaderstats--Put it in the leaderboard.
end--Close the function.

function handleKillCount(humanoid, player)
local killer = getKillerOfHumanoidIfStillInGame(humanoid)
if killer ~= nil then
local stats = killer:findFirstChild("leaderstats")
if stats ~= nil then
local kills = stats:findFirstChild("Money")
if killer ~= player then
kills.Value = kills.Value + 10 --Set to as much money as you want per kill

else
kills.Value = kills.Value - 1 --Dont mess with this.

end
end
end
end

game.Players.ChildAdded:connect(onPlayerEntered)---Connection line for onPlayerEntered.

How do i modify this script to make it so the leaderboard currency is Gold
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
05 Sep 2013 08:57 PM
If your going to use free models, Why don't you just look up a gold leaderboard?
Report Abuse
zach0arythesniper79 is not online. zach0arythesniper79
Joined: 18 Aug 2011
Total Posts: 211
05 Sep 2013 09:00 PM
I cant find one that is just gold because of rpgs making gold, levels and xp. i dont want levels or xp. also my brother is making a game and he needs currency called ZomBux. So i took this cause it works fine
Report Abuse
electricpretzel0 is not online. electricpretzel0
Joined: 30 Sep 2008
Total Posts: 1278
05 Sep 2013 09:07 PM
function onPlayerEntered(newPlayer)
local stats = Instance.new ("IntValue")
stats.Name = "leaderstats"
stats.Parent = newPlayer
local Money = Instance.new ("IntValue")
Money.Name = "Gold"
Money.Value = 0
Money.Parent = newPlayer.leaderstats
end
game.Players.ChildAdded:connect(onPlayerEntered)




yo that shuld werk for what you wanted
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
05 Sep 2013 09:15 PM
^This is disappointing, I sat there an made this though

USE MINE PL0X

function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local g = Instance.new("IntValue")
g.Name = "Gold"
g.Value = 25
g.Parent = stats
stats.Parent = newPlayer
newPlayer.Changed:connect(function (property)
end)
end

game.Players.ChildAdded:connect(onPlayerEntered)

Report Abuse
expressmyself is not online. expressmyself
Joined: 19 Apr 2011
Total Posts: 1768
05 Sep 2013 09:24 PM
lolol it might crash cuz you no put da wait.
Report Abuse
expressmyself is not online. expressmyself
Joined: 19 Apr 2011
Total Posts: 1768
05 Sep 2013 09:24 PM
I meant it will throw an error not crash.
Report Abuse
zach0arythesniper79 is not online. zach0arythesniper79
Joined: 18 Aug 2011
Total Posts: 211
05 Sep 2013 09:34 PM
I am so dumb! see i don't know an ounce of coding so what i tried to do is make it say This
local gold = Instance.new ("IntValue")
Gold.Name = "Gold"
Gold .Value = 100
Gold.Parent = newPlayer.leaderstats

Thank you for the help

By the way it Didn't work but i figured it out to change the money.name to money.name="gold"
Report Abuse
zach0arythesniper79 is not online. zach0arythesniper79
Joined: 18 Aug 2011
Total Posts: 211
05 Sep 2013 09:35 PM
Oh by the way if you want to see the game that Im trying to make with this coding its called Vampire Hunters
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
05 Sep 2013 11:34 PM
I dislike free model'd games
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