I'm trying to make a module for my prison, but when ever I try to request it, I get the error of,
requested module experienced an error while loading
My request script
require(434418787)
_PrisonServices.AssignTeam(game.Players.PlayerAdded,"New yeller")
My module named MainModule
local _PrisonServices = {}
local authorisedServers = {
[431532864] = true;
}
if authorisedServers[game.PlaceId] then
local children = script:GetChildren()
script = Instance.new("ModuleScript")
for _, child in pairs(children) do
child.Parent = script
end
script = nil
--Teaming Services
function _PrisonServices.AssignTeam(player,teamColor)
if game.Players:FindFirstChild(player) ~= nil then
player.TeamColor = BrickColor.new(teamColor)
player.Character.Humanoid.Health = 0
elseif player.Character ~= nil then
player.TeamColor = BrickColor.new(teamColor)
player.Character.Humanoid.Health = 0
end
end
--Admin Services
--TBA
--Control Services
--TBA
return _PrisonServices
else
Msg = Instance.new("Message",workspace)
Msg.Text = "You have not paid for this service. Please contact TheHospitalDev to purchase"
repeat
warn'You have not paid for this service'
wait(5)
until authorisedServers == 0
end
Any help is appreciated.

1 comment
P.S. I designed it to be annoying so it is unplayable if you didn't pay :P