I have a bug, where it says “ServerScriptService.Main.Abilities:16: attempt to index nil with ‘Head Attack’ - Server - Abilities”.
Module is a child of a server script.
Server script:
shared.Abilites = {}
task.spawn(function()
for i,v in pairs(script:GetDescendants()) do
if v:IsA("ModuleScript") then
shared.Abilities[v.Name] = require(v)
end
end
end)
Module script:
local module = {}
module.Start = function(plr : Player, tool : Tool)
print("Head Attack")
end
return module
Another thing: If module is just those two lines:
local module = {}
return module
Then it doesn’t work either
Sorry if there’s not enough information about the issue, its my first topic