I get how pcall works, but I don’t get when I should use it.
Use PCalls to handle things that could possibly error, such as datastores or Http requests, or if you're finding code doesn't work, you could do something like:
local success, err = ypcall(function() ppppppppppprint("i error!") end) if not success then print("Oops! I errored: " .. err) else print("I succeeded!") end
This is a good tool for code errors, it is a good ally of a function if you want to keep track of what went wrong, you can use pcalls to keep track of your code carefully, putting one at each important step.