16:30:51.061 - Module code did not return exactly one value 16:30:51.063 - Requested module experienced an error while loading
Where I require the scripts:
role = require(table.remove(roles, math.random(#roles)))
One of my roles (they are all the same):
local Role = require(game.ServerScriptService.Roles.defRole)()
Role.ID = "Cop";
Role.Ability = "Investigate one player per night.";
Role.Attributes = "Vote for one player at night. The next day you get a hint of the player's role."
Role.Alignment = "town";
Role.Meetings = {"inves", "lynch"};
Role.Items = {}
return Role
The defRole:
return function()
local Role = {
ID = "";
Ability = "";
Attributes = "";
Alignment = "";
Meeting = {};
Items = {}
}
Role.canKill = function(gameObject, target, reason)
return true
end
Role.onKill = function(gameObject, target, reason)
Role.defaultOnKill(gameObject, target, reason)
end
Role.defaultOnKill = function(gameObject, target, reason)
local char = target.Character
if char then
char:BreakJoints()
wait(5)
char:Destroy()
end
end
return Role
end
Not sure why this is happening, if anyone has any input I would be highly appreciative.
