Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Keycode Is not a valid EnumItem?

Asked by 3 months ago

My code is this:

--// Functions

UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.X then if Chatting == true then Exit = true Sounds.Click:Play() end end end)

UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.Keycode.Z then if Chatting == true then Exit = true Sounds.Click.Play() end end end)

UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.E then

    if Detected == true then
        local Lines = DetectedNPC:FindFirstChild("Lines")

And It keeps saying: Keycode Is not a valid EnumItem, I really need help.

1
Can you please use the lua button for all of your code? KBRM101 383 — 3mo

2 answers

Log in to vote
0
Answered by 3 months ago
UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.X then if Chatting == true then Exit = true Sounds.Click:Play() end end end)

UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.Keycode.Z then if Chatting == true then Exit = true Sounds.Click.Play() end end end)

Your problem is at line 3 you wrote Keycode its KeyCode Capital C

Ad
Log in to vote
0
Answered by
ACHRONlX 255 Moderation Voter
3 months ago

It's Enum.KeyCode not Enum.Keycode.

Answer this question