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: This doesn't even make the leaderboard.

Previous Thread :: Next Thread 
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
31 Mar 2014 01:22 PM
Is there something wrong with my tables or what?

DS = game:GetService("DataStoreService"):GetDataStore("Rep")

Ranks = {"Devil", "Bandit", "Tango", "Civilian", "Friendly", "Hero", "Savior"}

Colors = {
Color3.new(1, 1, 0),
Color3.new(0, 0, 0),
Color3.new(1, 0, 0),
Color3.new(1, 1, 1),
Color3.new(0, 85/255, 0),
Color3.new(0, 85/255, 1),
Color3.new(0, 0, 127/255)
}

game.Players.PlayerAdded:connect(function(p)
repeat
local b = p:FindFirstChild("Backpack")
until b
repeat
local g = p:FindFirstChild("PlayerGui")
until g
repeat
local h = c:FindFirstChild("Humanoid")
until h
repeat
local t = c:FindFirstChild("Torso")
until t
repeat
local ra = c:FindFirstChild("Right Arm")
until ra
repeat
local la = c:FindFirstChild("Left Arm")
until la
repeat
local rl = c:FindFirstChild("Right Leg")
until rl
repeat
local ll = c:FindFirstChild("Left Leg")
until ra
local Key = "user_" .. p.userId
DS:UpdateAsync(Key, function(OldRep)
Rep = OldRep or 0
return Rep
end)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
--MAKES LEADERBOARD HERE (DOES NOT REACH THIS POINT)
local l = Instance.new("Model", p)
l.Name = "leaderstats"
local r = Instance.new("IntValue", l)
r.Name = "Rep"
r.Value = Rep
local rank = Instance.new("StringValue", p)
rank.Name = "Rank"
if Rep < -300 then --Devil -300 and lower
rank.Value = Ranks[1]
local ranknumber = 1
elseif Rep > -300 and Rep < -99 then --Bandit -100 to -299
rank.Value = Ranks[2]
local ranknumber = 2
elseif Rep > -100 and Rep < 49 then --Tango -50 to -99
rank.Value = Ranks[3]
local ranknumber = 3
elseif Rep == 0 then --Cvilian --0
rank.Value = Ranks[4]
local ranknumber = 4
elseif Rep > 49 and Rep < 100 then --Friendly 50 to 100
rank.Value = Ranks[5]
local ranknumber = 5
elseif Rep > 99 and Rep < 300 then --Hero 100 to 300
rank.Value = Ranks[6]
local ranknumber = 6
elseif Rep > 299 then
rank.Value = Ranks[7]
local ranknumber = 7
end
local s = script:FindFirstChild("AutoUpdation Rep"):Clone()
s.Parent = p.Backpack
s.Disabled = false
local gui = script.RepGui:Clone()
gui.Parent = game.Lighting
gui.Frame.Rep.Text = "REP: ".. p.leaderstats.Rep.Value ..""
gui.Frame.Rank.Text = "RANK: ".. p.rank.Value ..""
gui.Frame.Rank.TextColor3 = Colors[ranknumber]
gui.Frame.Name.Text = "".. p.Name ..""
gui.Frame.Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=".. p.Name ..""
gui.Name = p.Name
local CD = Instance.new("ClickDetector", t)
local cs = script.ClickScript:Clone()
cs.Parent = CD
cs.Disabled = false
end)
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
31 Mar 2014 01:33 PM
what's p.

#nerdsunited
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
31 Mar 2014 01:49 PM
game.Players.PlayerAdded:connect(function(p)



Arguments...
Report Abuse
GFXdylan is not online. GFXdylan
Joined: 09 Feb 2013
Total Posts: 679
31 Mar 2014 01:51 PM
ohoh lol
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
31 Mar 2014 01:56 PM
Ya... I think you're confusing yourself with all the repeats, keep to one repeat block.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
31 Mar 2014 02:24 PM
The repeats shouldn't be a problem -_-
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
31 Mar 2014 02:32 PM
Well it's pretty messy, reminds me of this well written paper:
https://www.thc.org/root/phun/unmaintain.html
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
31 Mar 2014 02:44 PM
"game.Players.PlayerAdded:connect(function(p)



Arguments..."

the p you're mentioning later in the script is outside the function scope.

#nerdsunited
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
31 Mar 2014 02:46 PM
@verified

It isn't he is using updateasync, the second argument is a function.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
01 Apr 2014 04:59 AM
Please help?
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
01 Apr 2014 05:38 AM
Come on guys...
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
01 Apr 2014 05:51 AM
Bumpity bumpity
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