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: random points amount

Previous Thread :: Next Thread 
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
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
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
30 Jun 2014 10:49 PM
can someone help me on this?
Report Abuse
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
01 Jul 2014 12:53 PM
sorry for the bump yall, but maybe someone is online who can help me now.
Report Abuse
Wehttam664 is not online. Wehttam664
Joined: 02 Oct 2009
Total Posts: 767
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
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
01 Jul 2014 01:05 PM
what is de-bounce?
Report Abuse
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
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
lnplodedalt is not online. lnplodedalt
Joined: 18 Mar 2014
Total Posts: 12637
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
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
01 Jul 2014 06:47 PM
you are an incredible person. i never expected so much help. thank you.
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