noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 11:13 AM |
This script is inside the normal ROBLOX leader board script, although the leader board doesn't have captures.
if kills.Value=>4 then game.Lighting.LevelUp.MahjongSword:clone().Parent=newPlayer.Backpack end
if kills.Value=>9 then game.Lighting.LevelUp.OrcBlade:clone().Parent=newPlayer.Backpack end
if Level.Value=>14 then game.Lighting.LevelUp.PhoenixAxe:clone().Parent=newPlayer.Backpack end
if Level.Value=>24 then game.Lighting.LevelUp.8BitSword:clone().Parent=newPlayer.Backpack end
if kills.Value=>34 then game.Lighting.LevelUp.DragonHunterSpear:clone().Parent=newPlayer.Backpack end
if kills.Value=>44 then game.Lighting.LevelUp.FireBrand:clone().Parent=newPlayer.Backpack end
if kills.Value=>64 then game.Lighting.LevelUp.IceSword:clone().Parent=newPlayer.Backpack end
if kills.Value=>84 then game.Lighting.LevelUp.ZombieAxe:clone().Parent=newPlayer.Backpack end
if kills.Value=>104 then game.Lighting.LevelUp.GrimAxe:clone().Parent=newPlayer.Backpack end
if kills.Value=>134 then game.Lighting.LevelUp.PhoenixClub:clone().Parent=newPlayer.Backpack end
if kills.Value=>164 then game.Lighting.LevelUp.IceHammer:clone().Parent=newPlayer.Backpack end
if kills.Value=>194 then game.Lighting.LevelUp.WindSword:clone().Parent=newPlayer.Backpack end
if kills.Value=>234 then game.Lighting.LevelUp.SuperKatana:clone().Parent=newPlayer.Backpack end
if kills.Value=>274 then game.Lighting.LevelUp.PhoenixSword:clone().Parent=newPlayer.Backpack end
if kills.Value=>314 then game.Lighting.LevelUp.InfernoSword:clone().Parent=newPlayer.Backpack end |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 11 Mar 2013 11:16 AM |
| What exactly is your problem? I only see very ugly script, and that's it. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 11:28 AM |
| It's not doing what it's supposed to do, which is give players different swords when the get enough kills. |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
| |
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 11 Mar 2013 11:38 AM |
Now we are talking...
Levels = {4 = "MahjongSword",9 = "OrcBlade",14 = "PhoenixAxe",24 = "8BitSword",34 = "DragonHunterSpear",44 = "FireBrand",64 = "IceSword",84 = "ZombieAxe",104 = "GrimAxe",134 = "PhoenixClub",164 = "IceHammer",194 = "WindSword",234 = "SuperKatana",274 = "PhoenixSword",314 = "InfernoSword"}
kills.Changed:connect(function() local sword; for num, obj in pairs(Levels) do if kills.Value >= num then sword = obj end end if sword then if not newPlayer.Backpack:FindFirstChild(sword) then game.Lighting.LevelUp[sword]:Clone().Parent = newPlayer.Backpack end end end)
|
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 11:40 AM |
| Thank you. I'll try it out now. |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 11:49 AM |
The output said:
12:48:04.150 - Workspace.LeaderboardV3.Script:1: '}' expected near '=' |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
| |
|
|
| 11 Mar 2013 12:00 PM |
@noone In the horrid script you posted, you switched the conditional operators around.
You need to do this: >= instead of => |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
| |
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 01:34 PM |
So it should work if I switch them?
|
|
|
| Report Abuse |
|
|
|
| 11 Mar 2013 01:42 PM |
| There's a thing called testing. |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
| |
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 02:21 PM |
15:21:05.636 - Workspace.LeaderboardV3.Script:1: attempt to index global 'kills' (a nil value) 15:21:05.637 - Script "Workspace.LeaderboardV3.Script", Line 1 15:21:05.637 - stack end |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2013 02:22 PM |
| Looks like "kills" doesn't exist :| |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
| |
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 02:33 PM |
| I put in a LocalScript rather than a global script. Now there's no errors from the output but it still doesn't work. |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
| |
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 11 Mar 2013 03:51 PM |
put this in a localscript
Levels = {4 = "MahjongSword"; 9 = "OrcBlade"; 14 = "PhoenixAxe"; 24 = "8BitSword"; 34 = "DragonHunterSpear"; 44 = "FireBrand"; 64 = "IceSword"; 84 = "ZombieAxe"; 104 = "GrimAxe"; 134 = "PhoenixClub"; 164 = "IceHammer"; 194 = "WindSword"; 234 = "SuperKatana"; 274 = "PhoenixSword"; 314 = "InfernoSword"} game.Players.LocalPlayer.leaderstats.kills.Changed:connect(function() local sword; for num, obj in pairs(Levels) do if kills.Value >= num then sword = obj end end if sword then if not newPlayer.Backpack:FindFirstChild(sword) then game.Lighting.LevelUp[sword]:Clone().Parent = newPlayer.Backpack end end end) |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 03:57 PM |
| Should the LocalScript a child of the leaderboard script? |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 11 Mar 2013 04:02 PM |
@lolb. Nay, numbers doesn't work laik datin tables QQ
Here, tried to fix mine:
Levels = {} Levels[4] = "MahjongSword" Levels[9] = "OrcBlade" Levels[14] = "PhoenixAxe" Levels[24] = "8BitSword" Levels[34] = "DragonHunterSpear" Levels[44] = "FireBrand" Levels[64] = "IceSword" Levels[84] = "ZombieAxe" Levels[104] = "GrimAxe" Levels[134] = "PhoenixClub" Levels[164] = "IceHammer" Levels[194] = "WindSword" Levels[234] = "SuperKatana" Levels[274] = "PhoenixSword" Levels[314] = "InfernoSword"
kills.Changed:connect(function() local sword; for num, obj in pairs(Levels) do if kills.Value >= num then sword = obj end end if sword then if not newPlayer.Backpack:FindFirstChild(sword) then game.Lighting.LevelUp[sword]:Clone().Parent = newPlayer.Backpack end end end) |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 05:51 PM |
| Kills is still a nil value. |
|
|
| Report Abuse |
|
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
| |
|
noone334
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 2454 |
|
|
| 11 Mar 2013 07:54 PM |
| I meant if it's not in a LocalScript. |
|
|
| Report Abuse |
|
|