I notice that Dev scripters are able to make a player not be able to use a certain move. Say if I made a punch script and it hit a player they wouldn't be able to use there move. And I find going into the backpack finding there tool is just a bad way of doing it. I notice Dev have a more better way of doing this, but I don't under stand how. Thanks for helping me.
COMMUNITY QUESTION
How can I access the Players Debounce?
1 answer
Hello, GGButNO_RE!
Debounce is an example, i mean...
example1 = false -- Aka Debounce
Part = Instance.new("Part") -- Lets start with a part!
Part.Parent = workspace -- The part spawns at the Workspace/Baseplate!
Part.Touched:Connect(function(hit) -- A function, it detects when the part is touched, (you can change hit to anything you want)
if hit.Parent:FindFirstChild("Humanoid") and example1 == false then -- And here, if example1 == false then, prints, so, you can use this method to stop a function from working temporarily!
print("Someone touched me!") -- Bingo!
example1 = true -- This function won't work anymore!
end
end)
-- Didn't check on studio, don't just copy that :l
So... hope i helped!
-- Note : You can also change the example1 to true or false, its all based on your function!
---- AIphanium
------ Tell me if you have more questions.
This discussion is preserved as it was. New answers, comments, and votes are closed.

13 comments
It should be example1 == false, not example1 = false. On line 6.
And you'll get an error on line 7, Print is a nil value.
incapaz, that is not a nice reason to vote down, remember, its an example, and just as YOU said, its not a request site.
It kind of was, you would be giving OP code that throws errors. And that had nothing to do with SH not being a request site.
Your just being rude.
Now tell me, what kind of error?
You'd get an error for not using == in conditionals, and Print is a nil value.
Have you checked the script again, pal?
Well, you have edited it. You wouldn't have, had I not told you.
Look, i DID mention that i didn't check that on studio.
Anyways, thank you for helping :l
Yes you did, but it doesn't mean you shouldn't check if it'll throw errors.
Incapaz, example1 == false is in an if statement, it needs two equals