akumaru11
|
  |
| Joined: 19 Nov 2009 |
| Total Posts: 2588 |
|
|
| 26 Jul 2011 09:54 PM |
Title. P.S i don't know were it's wrong And I don't know why it's wrong. Please Help!!! Soz.!!!
debounce=false
amnt = 1 -- Amount of Points you get function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if (debounce==true) then debounce = false if (h~=nil) then local thisplr = game.Players:findFirstChild(h.Parent.Name) if (thisplr~=nil) then local stats = thisplr:findFirstChild("leaderstats") if (stats~=nil) then local score = stats:findFirstChild("Points") if (score~=nil) then score.Value = score.Value + amnt end end end end end wait(0.1) debounce = true end
script.Parent.Touched:connect(onTouched)
I think i'm going mad! |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2011 09:56 PM |
| Try setting debounce true by default. |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2011 10:13 PM |
You debounce is false for the first person.. herE:
debounce=true
amnt = 1 -- Amount of Points you get function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if (debounce==true) then debounce = false if (h~=nil) then local thisplr = game.Players:findFirstChild(h.Parent.Name) if (thisplr~=nil) then local stats = thisplr:findFirstChild("leaderstats") if (stats~=nil) then local score = stats:findFirstChild("Points") if (score~=nil) then score.Value = score.Value + amnt end end end end end wait(0.1) debounce = true end
script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
|
| 26 Jul 2011 10:14 PM |
| Definitely not what I just told him, dude. |
|
|
| Report Abuse |
|
|
| |
|