so if not success then is sometimes used on other scripters, but why it is used? it is only used to know an error?
Here we set up for that situation:
local success, message = pcall(function() -- Let us say I have a script that does not need to work but I want to know if it fails in here end) if not success then print("Non crucial code failed error is: "..message) end
This time I don't want to do anything if it is successful so I use if not success
so that it only passes the if statement if there was a failure. I hope this helps and have a great day scripting!