Here is the script where its returning nil
local inputMap = {
mouseType = "MouseButton2";
keyType = nil;
execFunction = function(Toggle)
weapon:aim(Toggle)
end;
contextName = "Aim";
}
for i,v in pairs(inputMap) do
local function Bind(toggle, event)
local function toggled()
weapon.keyPressStates[v.contextName] = toggle
v.execFunction(toggle)
end
Inputs[event](v.mouseType, v.keyType, toggled, v.contextName..tostring(toggle))
end
weapon.keyPressStatesp[v.contextName] = false
Bind(true, "BindOnBegan")
Bind(false, "BindOnEnded")
end
When im tyring to get it in the for loop it wont return the value of anything in it because it returns nil