It is possible to make a localscript that can detect error form exploit?

It is possible to make a localscript that can detect error that come form exploit?

Example: When hacker try to make a hack script and he write wrong name or something and got error then script will detect and check if that script are in my game or not if not then kick him

Do you mean like a code system where you enter a code, and if its wrong it kicks the exploiter?

local LogService = game:GetService'LogService'

LogService.MessageOut:Connect(function(Message, Type)
	if Type == Enum.MessageType.MessageError then
		warn("Error:", Message)
	end
end)

error("hi")

2 Likes

You could like @heII_ish has demonstrated, however most exploits now redirect errors and warnings to their own internal UI to prevent this form of anti-cheat so it wouldn’t be very effective.