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: I want help with this VIP leaderboard.

Previous Thread :: Next Thread 
Bomber2607 is not online. Bomber2607
Joined: 28 Nov 2008
Total Posts: 524
21 Jul 2011 11:00 AM
I want this so people without VIP start with 0 cash, and when people WITH VIP start out 1250 cash, but the Leaderboard doesnt work now. I think its because of the VIP part. Can anyone fix this? Thanks.


function onPlayerEntered(newPlayer)
wait(.5)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local stats2 = Instance.new("IntValue")
stats2.Name = "Tycoon"

local cash = Instance.new("IntValue")

cash.Name = "Cash"
cash.Value = 0

cash.Parent = stats
stats2.Parent = newPlayer
stats.Parent = newPlayer

while true do
wait(10)
local cha = game.Workspace:findFirstChild(stats.Parent.Name)
if cha ~= nil then
local shirt = cha.Torso:findFirstChild("roblox")
if shirt ~= nil then
if shirt.Texture == "http://www.roblox.com/asset/?id=56799758" then
cash.Value = 1250
end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
21 Jul 2011 11:01 AM
No requests, and title fix
Report Abuse
Bomber2607 is not online. Bomber2607
Joined: 28 Nov 2008
Total Posts: 524
21 Jul 2011 11:01 AM
Im not requesting anything. Im simply asking help with this.
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
21 Jul 2011 11:02 AM
Ok then here:
Find out if the player enterd is wearing the shirt or not. If he/she is then add the amoutn wanted points to the player's leaderstats, point's value.
Report Abuse
Bomber2607 is not online. Bomber2607
Joined: 28 Nov 2008
Total Posts: 524
21 Jul 2011 11:04 AM
Well, I found one issue I made, I have a while true do in there. I forgot to remove that because i was going to make it so the VIP would get 5 extra cash per second, but I didnt like that idea.
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
21 Jul 2011 11:06 AM
You wanted help, I gave you help.
Report Abuse
Bomber2607 is not online. Bomber2607
Joined: 28 Nov 2008
Total Posts: 524
21 Jul 2011 11:08 AM
Thats a suggestion.
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
21 Jul 2011 11:09 AM
Suggestion is help. Help is not making. Learn the difference. I gave you an idea of how you would go about accomplishing your goal. Giving someone help on a problem is not giving them the answer ;O
Report Abuse
Bomber2607 is not online. Bomber2607
Joined: 28 Nov 2008
Total Posts: 524
21 Jul 2011 11:11 AM
This is what I came up with.


function onPlayerEntered(newPlayer)
wait(.5)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local stats2 = Instance.new("IntValue")
stats2.Name = "Tycoon"

local cash = Instance.new("IntValue")

cash.Name = "Cash"
cash.Value = 0

cash.Parent = stats
stats2.Parent = newPlayer
stats.Parent = newPlayer

wait(0.5)
local cha = game.Workspace:findFirstChild(stats.Parent.Name)
if cha ~= nil then
local shirt = cha.Torso:findFirstChild("roblox")
if shirt ~= nil then
if shirt.Texture == "http://www.roblox.com/asset/?id=56799758" then
cash.Value + 1250

game.Players.ChildAdded:connect(onPlayerEntered)
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