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 » Scripters
Home Search
 

Re: Anti-Spam --HELP

Previous Thread :: Next Thread 
CrixusOdalisManiatus is online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
14 Oct 2016 10:36 PM
--Automatic gun script--
--how would I make it so that they can't spam Q to result in more projectiles p/wait()?

--If I were to spam Q 4 times very fast, then hold Q, it'd result in shooting 4 projectiles per wait(firerate) instead of just 1, which it should be--.



local Activated = false
MyMouse.KeyDown:connect(function(key)
if auto == 2 then
if string.lower(key) == "q" then
if ClipSize > 0 then
if not reloading then
if not Activated == true then
Activated = true
repeat wait(firerate)
fire(player["Humanoid"].TargetPoint)
until not Activated
end end end end
end
end)
MyMouse.KeyUp:connect(function(Key)
if auto == 2 then
if Key:lower() == "q" then
Activated = false
end end
end)
Report Abuse
CrixusOdalisManiatus is online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
14 Oct 2016 10:39 PM
I've tried adding wait for the keyup event, which just delayed the stopping and still allowed spam.
i've tried putting the if thens inside the repeat wait() and it broke the automatic property.
tried puting wait() and wait(firerate) after fire() and it still resulted in the spam.
put wait() everywhere i could but that didn't prevent it.


what do i do
Report Abuse
CrixusOdalisManiatus is online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
14 Oct 2016 10:41 PM
bump
Report Abuse
iwastedallmyrobux is not online. iwastedallmyrobux
Joined: 20 Nov 2008
Total Posts: 172
14 Oct 2016 10:47 PM
bump2


i am the best melon ever
Report Abuse
Stereotypical_Nerd is not online. Stereotypical_Nerd
Joined: 08 Feb 2012
Total Posts: 2088
14 Oct 2016 10:49 PM
http://wiki.roblox.com/index.php?title=Debounce


game.Players:findFirstChild("Stereotypical_Nerd"):WaitForChild("leaderstats")['Whiteness and Nerdiness'].Value=math.huge
Report Abuse
CrixusOdalisManiatus is online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
14 Oct 2016 11:06 PM
i use debounces already


but the repeat wait() until completely ignores the 'activated' debounce and allows for stacking
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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