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
 

Debounce this for me.. :/

Previous Thread :: Next Thread 
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
15 Jul 2012 02:22 PM
Whenever I debounce scripts It just WONT work.. In other words I'm terrible at it...

I know some of you are gonna call me lazy.. I'm actually not =\..


Please debounce this script for me!

a=game.Workspace.Part101
b=game.Workspace.Part102
c=game.Workspace.Part103
d=game.Workspace.Part104
e=game.Workspace.Part105
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
a.Transparency=0
a.CanCollide=true
wait(0.8)
b.Transparency=0
b.CanCollide=true
wait(0.8)
c.Transparency=0
c.CanCollide=true
wait(0.8)
d.Transparency=0
d.CanCollide=true
wait(0.8)
e.Transparency=0
e.CanCollide=true
wait(6)
a.Transparency=1
wait(0.8)
b.Transparency=1
wait(0.8)
c.Transparency=1
wait(0.8)
d.Transparency=1
wait(0.8)
e.Transparency=1
a.CanCollide=false
b.CanCollide=false
c.CanCollide=false
d.CanCollide=false
e.CanCollide=false
end
end)




Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
15 Jul 2012 02:32 PM
local items = {Workspace.Part101, Workspace.Part102, Workspace.Part103, Workspace.Part104, Workspace.Part105}
local debounce = false
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") and not debounce then
debounce = true
for i=1,#items do
items[i].Transparency = 0
items[i].CanCollide = true
wait(0.8)
end
wait(6)
for i=1,#items do
items[i].Transparency = 1
items[i].CanCollide = false
wait(0.8)
end
debounce = false
end
end)
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