#when to use pcall
1 messages · Page 1 of 1 (latest)
when you dont want something to stop the entire script, use it when things are prone to error like http requests
or like roblox services that error alot
people usually use it for :ComputePath
oh it makes sense
alr alr
you could also use it to find hacker that send values trough remote events by tring to access an object property in a Pcall, if it fails then it mean the object is not what it's supposed to be so you can kick him without halting the whole script
ur doing too much
https://devforum.roblox.com/t/pcalls-when-and-how-to-use-them/393687
@charred widget this will help if you're still confused
Introduction Protected calls, formally known as pcalls, can run functions without erroring and provide if your code was successfully ran but what’s the best way to use them and when should I? In this tutorial I will be covering the entirety of pcalls and where you’ll need them, so lets begin! Pcall basics First and foremost, we should lea...
thank u g
i mean i understood the basics just need to see when i can use it ill try some scripts in these days
make a datastore system then
you use it in that alot
you can also make retry loops with that
sure, i’ve seen people use it there in fact
at first i was like why should i use pcall if i can fix the script if theres an error but sometimes its roblox that makes errors
yep exactly
so useful for things like these