For my game, I need to temporarily disable a specific key, which is the Z key on the keyboard. What I managed to do is disable the player's control which are the keys WASD & space with this local script.
local PlayerModule = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule"))
local Controls = PlayerModule:GetControls()
Controls:Disable()
Controls:Enable()
But I also want to temporarily disable the Z key. Someone can help me with the Z key please

3 comments
It work to disable the key but it don't work to enable it back do u know why?
I don't think I typed it right, lemme research
try this, it might not work tho