Hello. I'm new to Lua and Trying to set up an Input Dictionary, but I am getting an error. Any help would be much appreciated. Thanks
``lua
local UserInputService = game:GetService("UserInputService")
local inputDictionary = {
["Tab"] = print("Player has pressed Tab!"),
["R"] = print("Player has pressed R!")
}
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
local keyPressed = input.KeyCode
inputDictionary[keyPressed] -- Incomplete statement: expected assignment or a function call
end
end)
``