I was wondering if it’s possible to essentialy force open the leaderboard for a player?
what do you mean by the leaderboard could you show an example?
The CoreGui that shows all players and their Currencies let’s say.
it is possible i saw many games do it but idk how
Ask AI its free and it can handle simple things like this
unfortunately, roblox does not have this feature yet but you could make your player list and rescript it
ai for coding is bad and most of time its not accurate because the data its trained on is outdated it also gives unreliable and over-complicated code
Ig you haven’t used AI recently lol
Check this out: ChatGPT first stated it isn’t possible to force via CoreGUI, but then gave a solution after another prompt to disable the leader board and make your own. It also gave scripts.
Prompt:
roblox studio I was wondering if it’s possible to essentialy force open the leaderboard for a player?
ChatGPT said:
Yes, it’s possible to force open the leaderboard for a player in Roblox Studio using the StarterGui:SetCoreGuiEnabled and PlayerGui:SetCore functions. However, the leaderboard (CoreGui element) is primarily controlled by the player, so while you can enable it, you cannot force it to stay open persistently if the player closes it.
Here’s how you can ensure the leaderboard is enabled and momentarily make it the focus:
Enabling the Leaderboard
game:GetService(“StarterGui”):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
This ensures that the leaderboard (player list) is enabled and accessible.
Opening the Leaderboard for the Player
To simulate “opening” the leaderboard, you can programmatically set focus on the player list UI with the following script:
local player = game.Players.LocalPlayer
– Set the leaderboard to appear (trigger opening briefly)
player:LoadCharacter()
wait(1) – Ensure some delay for UI stabilization
game:GetService(“StarterGui”):SetCore(“TopbarEnabled”),false```
You said:
how can I force it to stay persistently?
ChatGPT said:
Unfortunately, Roblox does not provide an official API to “lock” the leaderboard (PlayerList) in the open state persistently, as this behavior is controlled by the player’s client. However, you can create a custom leaderboard GUI and disable the default CoreGui leaderboard entirely. This way, you have full control over its appearance and persistence.
Steps to Create a Persistent Custom Leaderboard
Disable the Default Leaderboard: Use the StarterGui:SetCoreGuiEnabled method to hide the default leaderboard.
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
Create a Custom Leaderboard GUI: Use ScreenGuis and Frames to create your own leaderboard interface. This allows you to manage and display player data as you want.
Script the Custom Leaderboard: Use PlayerAdded, PlayerRemoving, and Changed events to track players and update your custom leaderboard.
Example Script for a Custom Leaderboard
Here’s a basic implementation:
Create the UI:
Insert a ScreenGui into StarterGui.
Inside the ScreenGui, add a Frame for the leaderboard background.
Inside the Frame, add TextLabels to display player names and scores.
Leaderboard Script: Add this to a Script in ServerScriptService:
local Players = game:GetService(“Players”)
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local UpdateEvent = Instance.new(“RemoteEvent”, ReplicatedStorage)
UpdateEvent.Name = “UpdateLeaderboard”
local leaderboardData = {}
– Update leaderboard data
local function updateLeaderboard()
leaderboardData = {}
for _, player in pairs(Players:GetPlayers()) do
table.insert(leaderboardData, {
Name = player.Name,
Score = player.leaderstats and player.leaderstats.Score.Value or 0
})
end
-- Sort by score (descending)
table.sort(leaderboardData, function(a, b)
return a.Score > b.Score
end)
-- Fire update to clients
UpdateEvent:FireAllClients(leaderboardData)
end
– Monitor player addition/removal
Players.PlayerAdded:Connect(function(player)
player.leaderstats = Instance.new(“Folder”, player)
player.leaderstats.Name = “leaderstats”
local score = Instance.new("IntValue", player.leaderstats)
score.Name = "Score"
score.Value = 0
updateLeaderboard()
end)
Players.PlayerRemoving:Connect(function(player)
updateLeaderboard()
end)
– Monitor score changes
for _, player in pairs(Players:GetPlayers()) do
player.leaderstats.Score.Changed:Connect(updateLeaderboard)
end
Client Script for UI: Add this to a LocalScript inside the ScreenGui:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UpdateEvent = ReplicatedStorage:WaitForChild("UpdateLeaderboard")
local leaderboardFrame = script.Parent:WaitForChild("LeaderboardFrame")
UpdateEvent.OnClientEvent:Connect(function(data)
-- Clear existing entries
for _, child in pairs(leaderboardFrame:GetChildren()) do
if child:IsA("TextLabel") then
child:Destroy()
end
end
-- Populate leaderboard
for i, entry in ipairs(data) do
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 0, 30)
label.Position = UDim2.new(0, 0, 0, (i - 1) * 30)
label.Text = string.format("%d. %s - %d", i, entry.Name, entry.Score)
label.Parent = leaderboardFrame
end
end)
Advantages of a Custom Leaderboard:
Full Control: You can decide exactly how it looks and behaves.
Persistence: The leaderboard will stay open as long as your GUI is visible.
Customization: Easily add features like icons, animations, or sorting methods.
Let me know if you need help with the GUI design or scripting!
i did some testing with chatgpt and roblox studio ai assistance and here are the results
prompt :
give me a roblox script that allows players to give their money to other players
output :
if you don’t know what an issue with this code is the exploiter can send NAN value to the server and they would have infinite money this issue occurred both on roblox studio AI assistance and ChatGPT
still not convinced ? heres more proof that ai is bad for coding
prompt : make me a game pass gifting system for my roblox game that will allow players to gift game passes to others
output :
using ai for coding is bad because :
- 1 hard to update code because you mostly wont know how stuff work because you didnt actually scripted it
- 2 you wont be learning anything because the ai would be doing most of work for you also the point of creating something is to gain knowledge and have fun and having ai generating code for you is just… not fun and you also wont gain any knowledge
- 3 exploitable / unreliable code
- 4 ai is meant to make some stuff less time consuming it wasn’t meant to write entire code for you if that worked then everyone would be a millionaire and create games in minutes
Also i doubt the code you showed above even works and even if it does work it will be difficult to maintain and update in the future because the structure of how it works is generated by AI
see ? even the ai itself agrees lol
I think not possible, but im not sure. You should use custom leaderstats instead
Lol why would you worry about exploiters? As long as you develop checks and safeguards you won’t have an issue. People can exploit anything- the only proofing is checks.
Right, first of all. I do not want a custom leaderboard. There’s no reason whatsoever for me to make a new leaderboard i just want the classic leaderboard to pop up. (And i also don’t wanna rely on ai because i can make my own scripts and fix them.)
i wnated to change up the backpack gui once, and i needed to code a custom one in order to that
moral of the story? if you want to accomplish this, you need a custom leaderboard
A custom leaderboard is the only solution for “forcing it open”. It doesn’t matter what you want; thats the solution.