Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is a try catch block the same as a pcall?

Question in title,

Are they the same thing pretty much?

2 answers

Well, sort of. A pcall is basically just an environment where errors will not halt the script. If an error throws inside that pcall, the pcall will stop, the block inside it, and continue with the rest of the script. You can get the error aswell.

local success, error = pcall(function()
	print("test")
end)

For more information, click here

The answer is a simple yes, for anyone who might stumble across this like I did.

This discussion is preserved as it was. New answers, comments, and votes are closed.