Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Keycode Is not a valid EnumItem?

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 comment

1

Can you please use the lua button for all of your code?

2 answers

✓ Accepted answer
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

This discussion is preserved as it was. New answers, comments, and votes are closed.