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
 

Can someone please explain denounce to me?

Previous Thread :: Next Thread 
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Feb 2014 02:44 PM
And what it's useful for?

If you want you could just sent me to the wiki but I think you guys could explain better, but do as you wish.
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Feb 2014 02:44 PM
I meant debounce sorry ipad auto corrects ;/
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Feb 2014 02:49 PM
It prevents code from running twice at the same time.

debounce = false
if debounce = false then
debounce = true
--stuff
debounce = false
end
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Feb 2014 02:50 PM
If I kept it at true would it keep it true for only one pLayer or for everyone in the server?
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Feb 2014 02:51 PM
The value is only within that script.
Report Abuse
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
11 Feb 2014 02:56 PM
To answer your last question, it would affect everyone if you are using a regular script
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Feb 2014 02:57 PM
Thanks so much for the help.
Also I just realized I already knew this but didn't know it was called debounce ...
But you did help me by telling me who it affected thanks !
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Feb 2014 02:57 PM
So Mario if I wanted it to affect only one player I would add it to local script?
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Feb 2014 03:04 PM
debounce = true
script.Parent.Touched:connect(function()
print'We were touched'
if debounce == true then
print'Debounce is true...making it false'
debounce = false
print'debounce is now false'
else -- this is when debounce is false
print'debounce is false'
wait(2)
debounce = true
end
end)


--Paste this into a script and put the script into a part then walk over the part.
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Feb 2014 03:05 PM
Read this.

http://wiki.roblox.com/index.php/Debounce

If you really want to learn, you'll read it all.
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Feb 2014 03:08 PM
Thanks smiley
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
11 Feb 2014 03:10 PM
One script stays in one script


-- One script --
Stuff = true
print(Stuff)
>true
-- Other script --
print(Stuff)
>nil
OR
>error: string expected
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Feb 2014 03:23 PM
Thanks i already got it you guys dont have to keep posting thanks.
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