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;-;
local canPress = true ----------------------------------------------- function onTouched(part) if input.KeyCode == Enum.KeyCode.C and canPress == true then canPress = false end end script.Parent.Touched:connect(onTouched)
This make's it so when touched, the player cannot press C to active the rest of the script, due to the boolValue set to False.
If it doesn't work, please let me know
Where is this "input" variable coming from on line 4? You can't get user input from the server,