I am finding a few bugs in my game I am trying to get rid of. Is there a way to disable keypress(C) on touch(brick)?
For Example
local key = Enum.KeyCode.C
-----------------------------------------------
function onTouched(part)
if input.KeyCode == Enum.KeyCode.C then
key = false
end
end
script.Parent.Touched:connect(onTouched)
Any help?
Also tell me where to put the script;-;

6 comments
What script?
It didnt work. I don't know where to put the script, if it is a local / module / regular script, or where to put it. Where do I use the boolValue?!?!?
I would put this in a Local Script & you already made a variable containing a True/False Value, so there's no need to make a seperarte boolValue
still doesn't work...here is the script i'm using - https://codeshare.io/5z3DXb try the link. I might accept your answer because, you were trying to help me.
Hmmm, if you could shorten the scirpt to only the part that needs fixing, that would help very much
The parts that need fixing is everything...mostly.