As I was working on a module script, I found that when I tried calling a "return true" or "return false", it'd either "return nothing" or "return nil". I tried to figure out why it was doing this, but was unable to come to a conclusion.
function api.isPlayer(name)
local s, m = pcall(function()
local plr = Players:FindFirstChild(name)
if plr then
return true
else
return false
end
end)
if s then return else error(m) end
end

1 comment
Thank you @radusavin366 for having the solution to this! Never knew it was something so simple...