Im wonder if roblox has something like pythons
try:
print(“hi”
except:
warn(“error”)
the try except function is where in the try, you put in your code and if theres an error instead of stopping the script it goes to the except: where u put a print saying it errored or something
function source(a, b)
assert type(a) == "number"
assert type(b) == "number"
return a + b
end
function msgh(msg)
warn("Error Occurred: " .. msg)
return nil
end
xpcall(source, msgh, 1, 2)
xpcall(source, msgh, "test", 2)