문제

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

도움이 되었습니까?

해결책 2

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top