Whut is xpcall?

i dont think the // are neccsesarty

You don’t need to check if an error had happened with that if statement, the given error handler function only runs if the function errored, if it didn’t, then the function never runs.

An e rror will always be sent to the error handler function so the if statement will always pass

2 Likes

I know I learned xpcalls like 5 mins ago.

2 Likes

And also, if the error handler function doesn’t return anything, Part, the 2nd return of xpcall will be nil, so I think return Error would be better in that case than print(Error) so if it wasn’t successful, then it will print out the error there, but it’s preference if you want to print hte error in the function or as the 2nd return unless you’d be needing to use it

Although I think it was a bit unneeded of me to mention that bit, sorry aobut that!

@ZINTICK My hands are really good at typing fast at the cost of accuracy lol

1 Like