Remove notifications, reset button, and more

Hello,

I’m trying to remove the reset button from roblox UIs using SetCore from StarterGui service but… getting this error :

 00:53:32.278  CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:215: Invalid argument to PromptSendFriendRequest  -  Client
  00:53:32.278  Stack Begin  -  Studio
  00:53:32.278  Script 'CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt', Line 215 - function PromptRequestFriendPlayer  -  Studio
  00:53:32.279  Stack End  -  Studio
  00:53:32.279  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:215: Invalid argument to PromptSendFriendRequest  -  Studio
  00:53:32.279  CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:308: Invalid argument to PromptUnfriend  -  Client
  00:53:32.279  Stack Begin  -  Studio
  00:53:32.279  Script 'CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt', Line 308 - function PromptUnfriendPlayer  -  Studio
  00:53:32.279  Stack End  -  Studio
  00:53:32.279  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:308: Invalid argument to PromptUnfriend  -  Studio
  00:53:32.279  CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:107: Invalid argument to PromptBlockPlayer  -  Client
  00:53:32.279  Stack Begin  -  Studio
  00:53:32.279  Script 'CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt', Line 107 - function PromptBlockPlayer  -  Studio
  00:53:32.279  Stack End  -  Studio
  00:53:32.279  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:107: Invalid argument to PromptBlockPlayer  -  Studio
  00:53:32.280  CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:167: Invalid argument to PromptUnblockPlayer  -  Client
  00:53:32.280  Stack Begin  -  Studio
  00:53:32.280  Script 'CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt', Line 167 - function PromptUnblockPlayer  -  Studio
  00:53:32.280  Stack End  -  Studio
  00:53:32.280  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:167: Invalid argument to PromptUnblockPlayer  -  Studio

Sometimes the script is not able to remove the reset button :

 00:55:00.025  SetCore: ResetButtonCallback has not been registered by the CoreScripts  -  Client - DisableRobloxUI:13
  00:55:00.025  Stack Begin  -  Studio
  00:55:00.025  Script 'Players.ptitloup132.PlayerScripts.DisableRobloxUI', Line 13  -  Studio - DisableRobloxUI:13
  00:55:00.025  Stack End  -  Studio

Code:

local plr = game:GetService("Players").LocalPlayer
local StarterGui = game:GetService("StarterGui")

plr.CharacterAdded:Wait()

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Captures, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)


StarterGui:SetCore("ResetButtonCallback", false)
StarterGui:SetCore("PointsNotificationsActive", false)
StarterGui:SetCore("BadgesNotificationsActive", false)
StarterGui:SetCore("SendNotification", false)
StarterGui:SetCore("DevConsoleVisible", false)
StarterGui:SetCore("PromptSendFriendRequest", false)
StarterGui:SetCore("PromptUnfriend", false)
StarterGui:SetCore("PromptBlockPlayer", false)
StarterGui:SetCore("PromptUnblockPlayer", false)
1 Like

Alright, this might be a bit hacky, but would this work?

while not pcall(StarterGui.SetCore, StarterGui, "ResetButtonCallback", false) do
	task.wait()
end
1 Like

I tried it, I think it works but… is there any other way without a possible infinite loop :> ?

Outside of creating a custom timeout, I don’t think so.

1 Like

I’m counting the number of iterations; do you think 5 is enough per “core type”?

That might work. I could write something real quick to help accomplish that.

local plr = game:GetService("Players").LocalPlayer
local StarterGui = game:GetService("StarterGui")

plr.CharacterAdded:Wait()

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Captures, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)


local function disableCore(coreName)
	local i = 20
	while not pcall(StarterGui.SetCore, StarterGui, coreName, false) and i ~= 0 do
		task.wait(0.1)
		i = i - 1
	end
end

disableCore("ResetButtonCallback")
disableCore("PointsNotificationsActive")
disableCore("BadgesNotificationsActive")
disableCore("SendNotification")
disableCore("DevConsoleVisible")
disableCore("PromptSendFriendRequest")
disableCore("PromptUnfriend")
disableCore("PromptBlockPlayer")
disableCore("PromptUnblockPlayer")

I’ve done this

I have still some errors… these :

00:53:32.278  CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:215: Invalid argument to PromptSendFriendRequest  -  Client
  00:53:32.278  Stack Begin  -  Studio
  00:53:32.278  Script 'CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt', Line 215 - function PromptRequestFriendPlayer  -  Studio
  00:53:32.279  Stack End  -  Studio
  00:53:32.279  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:215: Invalid argument to PromptSendFriendRequest  -  Studio
  00:53:32.279  CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:308: Invalid argument to PromptUnfriend  -  Client
  00:53:32.279  Stack Begin  -  Studio
  00:53:32.279  Script 'CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt', Line 308 - function PromptUnfriendPlayer  -  Studio
  00:53:32.279  Stack End  -  Studio
  00:53:32.279  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/FriendPlayerPrompt:308: Invalid argument to PromptUnfriend  -  Studio
  00:53:32.279  CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:107: Invalid argument to PromptBlockPlayer  -  Client
  00:53:32.279  Stack Begin  -  Studio
  00:53:32.279  Script 'CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt', Line 107 - function PromptBlockPlayer  -  Studio
  00:53:32.279  Stack End  -  Studio
  00:53:32.279  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:107: Invalid argument to PromptBlockPlayer  -  Studio
  00:53:32.280  CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:167: Invalid argument to PromptUnblockPlayer  -  Client
  00:53:32.280  Stack Begin  -  Studio
  00:53:32.280  Script 'CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt', Line 167 - function PromptUnblockPlayer  -  Studio
  00:53:32.280  Stack End  -  Studio
  00:53:32.280  SetCore: Unexpected error while invoking callback: CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:167: Invalid argument to PromptUnblockPlayer  -  Studio

Actually, roblox calls its functions and… by the time I deactivate them they are in calls so… what do I do?

I made a slight change to what I’d written before. Try this out instead:

local listOfCoreGui = {"ResetButtonCallback", "PointsNotificationsActive", "BadgesNotificationsActive", "SendNotification", "DevConsoleVisible", "PromptSendFriendRequest", "PromptUnfriend", "PromptBlockPlayer", "PromptUnblockPlayer"}

local function disableStinkyCoreGui(coreGui, timeOut)
	while not pcall(function() StarterGui:SetCore(StarterGui, coreGui, false) end) and timeOut > 0 do
		timeOut = timeOut - task.wait()
	end
end

for _, coreGui in ipairs(listOfCoreGui) do
	coroutine.wrap(disableStinkyCoreGui)(coreGui, 5)
end
2 Likes
local plr = game:GetService("Players").LocalPlayer
local StarterGui = game:GetService("StarterGui")

plr.CharacterAdded:Wait()

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Captures, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)


local listOfCoreGui = {"ResetButtonCallback", "PointsNotificationsActive", "BadgesNotificationsActive", "SendNotification", "DevConsoleVisible"}

local function disableStinkyCoreGui(coreGui, timeOut)
	while not pcall(function() StarterGui:SetCore(coreGui, false) end) and timeOut > 0 do
		timeOut = timeOut - task.wait()
	end
end

for _, coreGui in ipairs(listOfCoreGui) do
	coroutine.wrap(disableStinkyCoreGui)(coreGui, 5)
end

It works, but no idea why these core can’t be disabled:

  • PromptUnblockPlayer
  • PromptBlockPlayer
  • PromptSendFriendRequest
  • PromptUnfriend
1 Like

The registered by the CoreScripts error disappears if your local script is placed under game.StarterGui. The other error is telling you that you can’t run this part of your code because the arguments are wrong:

StarterGui:SetCore("PromptSendFriendRequest", false)
StarterGui:SetCore("PromptUnfriend", false)
StarterGui:SetCore("PromptBlockPlayer", false)
StarterGui:SetCore("PromptUnblockPlayer", false)

If you comment out that part your code runs without errors.

1 Like

Oh, but I’m being silly, I actually thought it was to disable notifications, but no, it’s to make the request… -_-

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.