Disable badge notification

Im using a custom badge notification system, because i do not like the one from roblox. However, I am trying to disable the badge notifications from roblox. To disable the notification from roblox, I use this piece of code:

repeat
	local error, message = pcall(function()
		game.StarterGui:SetCore("BadgeNotificationsActive",false)
	end)
until error == false or error == nil

However for some reason i still get the default notification from roblox as well.
image

5 Likes

I’m not sure what the exact problem is, but your code is incorrect. Your “error” variable is local and so the “error == nil” in the repeat statement will always be true.

Try this instead and see if it still happens:

local StarterGui = game:GetService("StarterGui")
local Success,Error
repeat
	Success,Error = pcall(function()
		StarterGui:SetCore("BadgeNotificationsActive", false)
	end)
	if not Success then
		print("There was an issue disabling Badge Notifications: "..Error)
		wait()
	end
until Success
18 Likes

You might want to tune that loop down!

If there is a general badgeservice failure you’re likely to cause some sort of dangerous behaviour to occur

1 Like