I was looking through the function dump page, and saw pcall. When I tried testing it as so, I get
'Baseplate' is not a valid member of Workspace
Don't think I'm misspelling anything wrong.
When I put in BasePlate, it prints yes
I'm trying to test the condition with an object that doesn't exist
oExists = function(thing)
local success,msg = pcall(function() return thing ~= nil end)
if success then
return true
end
return false
end
print(oExists(workspace["Baseplate"]) and "yes" or "no")

1 comment
pcall is almost never the answer. In particular, just reading this code, the function
pcallis given can't ever error.