Hi, I am trying to create a module script that’s under a main module script that will store functions for its specific purpose, and then add them to the table of the main module script.
My experience trying to do that though has been kind of tough.
Here is the main module script.
local Character = {
};
Character.__index = Character;
table.insert(Character, 1, require(script.Movement))
Character.New = function()
local NewCharacter = {};
setmetatable(NewCharacter, Character);
return NewCharacter;
end;
return Character;
Here is the movement module script that is under the main one.
local Movement = {};
function Movement:Dash()
--...
end;
function Movement:Run()
--...
end;
return Movement;
I haven’t got any script analysis errors, and only get this error once I join game and try using one of the functions from the client script.
local Character = require(game:WaitForChild("ReplicatedStorage").Character).New()
Character.Movement:Dash()
Can I get some help as to what I am doing wrong or a better way to deal with this?