lets say i have a script like this:
local Fart == true.."Fart"
This would give me an error because you cant add a bool and a string together. But how would i check that my script gave out an error?
Something like
script.error:Connect(function()
Im not sure if this exists, but please tell me if it does!
CZXPEK
(czo)
#2
you can use pcall
local suc, err = pcall(function()
--// script
end)
if (err) then
warn("script errored")
end
and theres also LogService.MessageOut but that will detect all scripts
game:GetService("LogService").MessageOut:Connect(function(msg, type)
if (type == Enum.MessageType.MessageError) then
warn("error:", msg)
end
end)
there are a LOT of parts that could if you do specific things could cause an error in my code, ill try the second thing u said later
1 Like
system
(system)
Closed
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.