|
| 30 Jun 2014 10:40 PM |
so im not sure why but whenever the round ends (somebody kills somebody) the person who gets the points gets a random amount. no i didnt use math.random.
x = 180 repeat x = x - 1 wait(1) print(x) for i,v in pairs(Players) do if v ~= H then v.Character.Humanoid.Died:connect(function() H.leaderstats.Wins.Value = H.leaderstats.Wins.Value + 1 close() end) H.Character.Humanoid.Died:connect(function() v.leaderstats.Wins.Value = v.leaderstats.Wins.Value + 1 close() end) end end until x == 0 round() end end
|
|
|
| Report Abuse |
|
|
|
| 30 Jun 2014 10:49 PM |
| can someone help me on this? |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2014 12:53 PM |
| sorry for the bump yall, but maybe someone is online who can help me now. |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2014 01:04 PM |
Most likely, it's an issue with multiple calls. Try adding de-bounce to the script.
The death event fires several hundred times a second sometimes. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Jul 2014 02:50 PM |
| can someone help me learn about debounce. the wiki doesnt make it make sense and im not sure how to make it work here. |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2014 02:56 PM |
adding a debounce:
local db = false
x = 180 repeat x = x - 1 wait(1) print(x)
for i,v in pairs(Players) do
if not db then db = true
if v ~= H then v.Character.Humanoid.Died:connect(function() H.leaderstats.Wins.Value = H.leaderstats.Wins.Value + 1 close() end)
db = false
H.Character.Humanoid.Died:connect(function()
if not db then db = true
v.leaderstats.Wins.Value = v.leaderstats.Wins.Value + 1 close() end) end
db = false
end
until x == 0 round() end end
|
|
|
| Report Abuse |
|
|
|
| 01 Jul 2014 06:47 PM |
| you are an incredible person. i never expected so much help. thank you. |
|
|
| Report Abuse |
|
|