Is this the proper xpcall way?

This is my code:

game.DescendantAdded:Connect(function(descendant)
	xpcall(function()
		print(descendant:GetFullName())
		print(descendant.Name:len())
	end,(function()
		print('errored, gui is in core gui!');
	end))
end)

This is just a test to see how xpcall works.

Here, i think this will be useful.

xpcall(function() --code

end, function() --on error

end)
1 Like

Ohh! Thanks! Will try

character limit