Search code examples
luaroblox

Key Bind Reader Script


Ok, so I made a Key Bind script, that sets a IntValue to the byte code of a Key you press. That works all fine. The problem is that the script that reads the Key Bind part doesn't work. Here is the script:

print("Running KeyCheck script")
KeyValue = script.Parent.KeyValue

function onChanged(Value)
    print("Changed: " .. Value)
end

KeyValue.Changed:connect(onChanged)

It's in a Local Script, in the player. KeyValue is the IntValue I mentioned earlier. I don't get any errors, but none of the prints well, print anything.


Solution

  • Ok, got it. Just had to set the KeyBind script to not local. Derp.