Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
|
| 09 Dec 2012 05:28 PM |
I don't know what's wrong with it, it checks the morph to find out what class you are then changes the leaderstat needed.
function onTouched(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then if hit.Parent:findFirstChild("xWep") ~= nil then player = game.Players:GetPlayerFromCharacter(hit.Parent) qwertyu = player.leaderstats.Paladin.Value player.Leaderstats.Paladin.Value = qwertyu + 1 script.Parent:remove() elseif hit.Parent:findFirstChild("Warhammah") ~= nil then player = game.Players:GetPlayerFromCharacter(hit.Parent) player.leaderstats.Warrior.Value = player.Leaderstats.Warrior.Value + 1 script.Parent:remove() end end end
script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
|
| 09 Dec 2012 05:38 PM |
| I can't believe there is a troll post getting more attention. |
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
|
| 09 Dec 2012 05:42 PM |
| I can't get more information because the leaderboard isn't added in solo mode. |
|
|
| Report Abuse |
|
|
dmjoe
|
  |
| Joined: 01 May 2009 |
| Total Posts: 2387 |
|
|
| 09 Dec 2012 05:45 PM |
| I don't understand what's wrong with this script.... |
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
| |
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
| |
|
|
| 10 Dec 2012 02:32 PM |
function onTouched(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then if hit.Parent:findFirstChild("xWep") ~= nil then player = game.Players:GetPlayerFromCharacter(hit.Parent) qwertyu = player.leaderstats.Paladin player.Leaderstats.Paladin.Value = qwertyu.Value + 1 script.Parent:Destroy() elseif hit.Parent:findFirstChild("Warhammah") ~= nil then player = game.Players:GetPlayerFromCharacter(hit.Parent) player.leaderstats.Warrior.Value = player.Leaderstats.Warrior.Value + 1 script.Parent:Destroy() end end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
| |
|
Raphael7
|
  |
| Joined: 03 Dec 2008 |
| Total Posts: 2479 |
|
|
| 10 Dec 2012 04:38 PM |
| Put prints on every line and tell us where it does not print. |
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
|
| 10 Dec 2012 08:00 PM |
| I literaly just said why that is not an option >.>. |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2012 08:03 PM |
In the script, you capitalize Leaderstats, and then say leaderstats again in another line. Make up your mind
Ex:
qwertyu = player.leaderstats.Paladin.Value ^ player.Leaderstats.Paladin.Value = qwertyu + 1
|Paradoxical| I shun thy heathen, dost thou not know that flames will devour thy mind? |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2012 08:06 PM |
script.Parent.Touched:connect(function(hit) local g = game.Players:GetPlayerFromCharacter(hit.Parent) if g ~= nil then if g.StarterGear:findFirstChild("xWep") ~= nil then Paladin = g.leaderstats.Paladin.Value g.Leaderstats.Paladin.Value = Paladin + 1 for i = 1,10 do script.Parent.Transparency = script.Parent.Transparency - 0.1 end script.Parent:Destroy()
elseif g.StarterGear:findFirstChild("Warhammah") ~= nil then g.leaderstats.Warrior.Value = g.Leaderstats.Warrior.Value + 1 for i = 1,10 do script.Parent.Transparency = script.Parent.Transparency - 0.1 end script.Parent:Destroy() end end end
Tell meh output.
Added little effects ^.^ |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2012 08:08 PM |
script.Parent.Touched:connect(function(hit) local g = game.Players:GetPlayerFromCharacter(hit.Parent) if g ~= nil then if g.StarterGear:findFirstChild("xWep") ~= nil then Paladin = g.leaderstats.Paladin.Value g.leaderstats.Paladin.Value = Paladin + 1 for i = 1,10 do script.Parent.Transparency = script.Parent.Transparency - 0.1 end script.Parent:Destroy()
elseif g.StarterGear:findFirstChild("Warhammah") ~= nil then g.leaderstats.Warrior.Value = g.leaderstats.Warrior.Value + 1 for i = 1,10 do script.Parent.Transparency = script.Parent.Transparency - 0.1 end script.Parent:Destroy() end end end
Fixed. |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2012 08:09 PM |
qwertyu = player.leaderstats.Paladin.Value -------------------^ player.Leaderstats.Paladin.Value = qwertyu + 1 -------^
|Paradoxical| I shun thy heathen, dost thou not know that flames will devour thy mind? |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2012 08:09 PM |
"l"eaderstats "L"leaderstats
|Paradoxical| I shun thy heathen, dost thou not know that flames will devour thy mind? |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2012 08:11 PM |
script.Parent.Touched:connect(function(hit) local g = game.Players:GetPlayerFromCharacter(hit.Parent) if g ~= nil then if g.StarterGear:findFirstChild("xWep") ~= nil then Paladin = g.leaderstats.Paladin.Value g.leaderstats.Paladin.Value = Paladin + 1 for i = 1,10 do script.Parent.Transparency = script.Parent.Transparency - 0.1 end script.Parent:Destroy()
elseif g.StarterGear:findFirstChild("Warhammah") ~= nil then g.leaderstats.Warrior.Value = g.leaderstats.Warrior.Value + 1 for i = 1,10 do script.Parent.Transparency = script.Parent.Transparency - 0.1 end script.Parent:Destroy() end end end
|
|
|
| Report Abuse |
|
|
Raphael7
|
  |
| Joined: 03 Dec 2008 |
| Total Posts: 2479 |
|
|
| 10 Dec 2012 09:40 PM |
| Put prints for every line so which ever does not print we know which line is broken. Use the suggestions before you deny them. |
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
|
| 11 Dec 2012 02:12 PM |
| I said that won't work and i said why, read every detail before you post. |
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
|
| 11 Dec 2012 02:13 PM |
The capitalization i need to fix i'll try that.
|
|
|
| Report Abuse |
|
|
Malconer
|
  |
| Joined: 19 Feb 2009 |
| Total Posts: 1296 |
|
| |
|
|
| 11 Dec 2012 02:34 PM |
| That was the problem the entire time... OMG WDF |
|
|
| Report Abuse |
|
|