开发者

Key Bind Reader Script

I FIXED IT! Yeeeeeeees.

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.

Thanks in advance, Sil3nt


Well, As long as script.Parent.KeyValue exists, it should work.

One thing you might wanna know is when any type of "Value" object is changed, it returns the value, not which property was changed.

I think you might already know that.

You might try it in a regular script.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜