Any ideas on turning off the "OneStatFrame" as part of the "TopRightContainer" in CoreGUI?


This thing here.

Is there any way exactly to remove this from the screen?
When looking at the CoreGuiTypes it does not appear there is any type for removing this specific object.

Is the best bet to just try to find it specifically and remove it?
(Even though this is oof if Roblox ever changes the name of it…)

That is an Xbox overlay. You cannot remove or modify it via CoreGui; Roblox does not expose it to Lua for security and compliance reasons.

How did you make it even appear though?

Nvm got it, since you have a custom leaderboard, you could rename the “leaderstats” folder to something like “Leaderstats” and everywhere you use it included.
This would not show that OneStatFrame anymore

However I want it to show for PC and Mobile players so I cannot change the name

A tad of jank… but you could probably rename the folder on the client if the device is console.

In this case I see 2 solutions, one of them is renaming the folder AND recreating the onestatframe using gui that you only activate if the player is on pc or mobile.
second solution would be what @ScottFaber said:

rename on the client but it also wouldn’t work then because it doesn’t do anything,
so a way I found out is a bit hacky it’s by renaming the folder and reparenting after, heres an example:

local input = game:GetService("UserInputService")
function platform()-- you can change this function as this is just an example
	task.wait(1)-- wait for the player to load
if input.TouchEnabled then
	return "Mobile"
elseif input.GamepadEnabled then
	return "Console"
elseif input.KeyboardEnabled then
	return "PC"
end
end
local player = game:GetService("Players").LocalPlayer
local leaderstats = player:WaitForChild("leaderstats",3)
local Platform=platform()--players platform or whatever they they have enabled
if Platform=="Console" then
	
	leaderstats.Name = "Leaderstats"
	leaderstats.Parent = nil 
	-- we parent to nil and then reparent to player so that it applies
	task.wait(0.01)--needed or use task.delay if needed lol
	leaderstats.Parent = player
	leaderstats.Name = "leaderstats"
	--rename back for use
end

With this as a client script you can disable the onestatframe specifically for console and still have it named “leaderstats” only on the client.

This is exactly what I meant aha, apologies for any confusion

1 Like