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-ed script.

Previous Thread :: Next Thread 
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
22 Jun 2012 02:22 AM
p=true
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if p then
p=false
local i = Instance.new("Message",game.Workspace)
i.Text="SSJ!"
wait(0.8)
i:Destroy()
local a = Instance.new("Fire",game.Workspace.hit.Parent.Torso)
a.Size=10
wait(1)
p=true
end
end
end)
--------

It sent up several messages so I added a debounce script. And now it's only
say "SSJ!" with no fire, and it wont let me press it again.
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
22 Jun 2012 02:24 AM
p = true
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if p == true then
p = false
local i = Instance.new("Message",game.Workspace)
i.Text = "SSJ!"
wait(0.8)
i:Destroy()
local a = Instance.new("Fire",game.Workspace:findFirstChild(hit.Parent).Torso)
a.Size = 10 --I don't know much about fire, you don't need any Vector or something?
wait(1)
p = true
end
end
end)
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
22 Jun 2012 02:34 AM
Cheater... It did the same thing.. :(
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
22 Jun 2012 02:36 AM
No, Cheaters script is different to yours.
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
22 Jun 2012 02:37 AM
Dude, it still had the same effect.
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
22 Jun 2012 02:38 AM
It did the exact same thing as what mine has done.. :l
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
22 Jun 2012 02:42 AM
It shows once the message and had problems with the Fire thing as I said already.
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
22 Jun 2012 02:44 AM
It shows ONE message. Then when you touch it again, NO message comes up..


>:l
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
22 Jun 2012 02:50 AM
Look at the output, it tells you why.
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
22 Jun 2012 02:53 AM
I'm gonna deal with this tomorrow. I'm tired.


I'll keep you updated.


g'Night!
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
22 Jun 2012 02:55 AM
09:54 here :/
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
22 Jun 2012 03:18 AM
test
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