Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Keycode Is not a valid EnumItem?

Asked by 4 years 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? IAmNotTheReal_MePipe 418 — 4y

2 answers

Log in to vote
0
Answered by 4 years 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
4 years ago

It's Enum.KeyCode not Enum.Keycode.

Answer this question