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
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")
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
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:
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: