Gui With Custom Enable Button

Im Making A Settings Gui With A Custom Keybind That Activates It

I Need Help With The Code I Been Messing Around With It But I Couldnt Fix It

I Keep Getting This Error “attempt to concatenate Enum with string”

it Gets The Key From Another Script That Has A Value Child

local UserInputService = game:GetService("UserInputService")
local KeyBindValue = script.Parent.KeyBind.LocalScript.Keybind.Value
local KeyBind = Enum.KeyCode..KeyBindValue

UserInputService.InputBegan:Connect(function(Key) -- Input detected!
	if Key.KeyCode == KeyBind then
		wait(0.1)
		print(KeyBind)
	end
end)

I Just Need Ideas Or A Fix For This Problem

You don’t concentrate enums.

local UserInputService = game:GetService("UserInputService")
local KeyBindValue = script.Parent.KeyBind.LocalScript.Keybind.Value
local KeyBind = Enum.KeyCode.KeyBindValue

UserInputService.InputBegan:Connect(function(Key) -- Input detected!
	if Key.KeyCode == KeyBind then
		wait(0.1)
		print(KeyBind)
	end
end)

Also I reccomend using ContextActionService instead because it supports textboxes.
https://create.roblox.com/docs/reference/engine/classes/ContextActionService

Try removing Enum.KeyCode.. from the 3rd line

how would i use ContextActionService With What Im Doing i Cant find any videos/devforums that would help me

local UserInputService = game:GetService("UserInputService")
local KeyBind = Enum.KeyCode

UserInputService.InputBegan:Connect(function(Key) -- Input detected!
	if Key.KeyCode == KeyBind then
		wait(0.1)
		print(KeyBind)
	end
end)
local KeyBindValue = script.Parent.KeyBind.LocalScript.Keybind.Value --???