Can you show your entire function please, a lot of the function isn’t in the screen shot. If you could copy and paste the entire function that would be even better. It’s hard to help if we can’t see all of the code.
local cannotload = false;
network.add("settings",function(plr,class,bool)
local file = getf(plr)
if file and file.settings and file.settings[class] and require(game.ReplicatedStorage.modules.settings)[class] and (bool == true or bool == false) then
file.settings[class] = bool
if (class == "Afk") then
if file.afk then
file.afk = bool
end
end
end
end)
not much code, Idk whats goin on
network.add just adds a function to a table, and here is the listener
function network.listen(plr,argument, ...)
if tonumber(argument) then
argument = network.keycomp[argument] or nil
end
if argument == nil then
return nil
end
local callback = network.listens[argument]
if callback then
return callback(plr,...)
end
end
Often when there is an error inside of a function, it gives an error on the first line of the function and an error on the line of the function that is causing the error. Are there any other errors in the output that could be related to this, or just that error on line 1043?