So I’m making a function that’s in a module script. Here is the code:
function module.example(y)
local variable = script.InventorySettings.FrameWidth.Inventory:FindFirstChild(y)
print(variable.Name)
end
Basically, Im supposed to write module.example("Frame")
, And each one of these have a different number at the end and it would print the part’s name but instead it prints this: Argument 1 missing or nil
and the error is coming from this part of the script:
local variable = script.InventorySettings.FrameWidth.Inventory:FindFirstChild(y)