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: Debounce help

Previous Thread :: Next Thread 
badguy1233 is not online. badguy1233
Joined: 23 Jul 2009
Total Posts: 885
17 May 2014 01:45 PM
This debounce isn't working. Any help please?
--
function onTouched(part,v)
if debounce==true then
debounce=false
if part.Parent==script.Parent then
v.Points.Value=v.Points.Value*2
end
debounce=true
end
end

while true do
wait()
debounce=true
for _,v in pairs (game.Workspace:GetChildren()) do
if v.Name=="Coin" then v.Touched:connect(function(part) onTouched(part,v) end) end
end
end


--It multiplies the v.Points.Value by 2 multiple times, instead on only once.
Report Abuse
badguy1233 is not online. badguy1233
Joined: 23 Jul 2009
Total Posts: 885
17 May 2014 01:55 PM
[bump]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 01:57 PM
Then remove the *2...
Report Abuse
badguy1233 is not online. badguy1233
Joined: 23 Jul 2009
Total Posts: 885
17 May 2014 02:00 PM
Its for that double points script you helped me on earlier.
I need the *2, but I don't want it to repeat.
Report Abuse
badguy1233 is not online. badguy1233
Joined: 23 Jul 2009
Total Posts: 885
17 May 2014 02:04 PM
[bump]
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