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)
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)
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 --???