Server.Functions.ViewBanReason.OnServerInvoke = function(mod, playerName)
if self:IsMod(mod) then
local response = ""
local success, msg = pcall(function()
local playerId = Server.Players:GetUserIdFromNameAsync(playerName)
local banInfo = self.BanLogsStore:GetAsync(playerId)
if playerId and banInfo then
local bannedByName = Server.Players:GetNameFromUserIdAsync(banInfo.BannedBy)
response = bannedByName .. ": \"" .. banInfo.Reason .. "\""
else
error("No player/logs found!")
end
end)
if success then
return response
else
return "Error: " .. msg
end
end
end
This code is meant to catch the error() call and return it back to the client. What happens instead is the pcall is completely disregarded and an error is thrown to the output with a blue tab next to it “I believe that’s the client”. This could be because it’s in a remotefunction invocation handler.