You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
to fix my leaderboard gui username glitching -
What is the issue? Include screenshots / videos if possible!
when i join the game
the username gui its keep glitching into
another username gui -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
To create new gui
replace the old gui into new gui
nothing work
repeat
wait()
until game:IsLoaded()local players = game:GetService(“Players”)
local runService = game:GetService(“RunService”)
local starterGui = game:GetService(“StarterGui”)
local teams = game:GetService(“Teams”)
local tweenService = game:GetService(“TweenService”)
local userInputService = game:GetService(“UserInputService”)local screenGui = script:FindFirstAncestorWhichIsA(“ScreenGui”)
local uiToggle = true
local uiCellScale = screenGui.Ui.Main.ListHolder.UIGridLayout.CellSize.Y.ScalescreenGui.Enabled = true
while true do
local layoutOrder = 1starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
for _, frame in pairs(screenGui.Ui.Main.ListHolder:GetChildren()) do
if (frame:IsA(“Frame”)) then
frame:Destroy()
end
endfor _, team in pairs(teams:GetTeams()) do
if team.Name ~= “UNIT” and #team:GetPlayers() > 0 then
local teamFrame = screenGui.Template.Team:Clone()
teamFrame.BackgroundColor3 = team.TeamColor.Color
teamFrame.LayoutOrder = layoutOrder
teamFrame.Name = string.format(“[Team] %s”, team.Name)
teamFrame.Parent = screenGui.Ui.Main.ListHolder
teamFrame.Visible = true
teamFrame.TeamName.Text = team.Namefor _, player:Player in pairs(team:GetPlayers()) do if player.Team.Name ~= "UNIT" then local playerFrame = screenGui.Template.Player:Clone() playerFrame.LayoutOrder = layoutOrder playerFrame.Name = string.format("[Player] %s", player.Name) playerFrame.Parent = screenGui.Ui.Main.ListHolder playerFrame.Visible = true if player.Team == game.Teams.Mafia then local mafia = game.ReplicatedStorage.Remotes.MafiaSystemFunction:InvokeServer("getplayermafiadataOTHER", player.UserId) if mafia then playerFrame.PlayerName.Text = mafia["MafiaName"].." - "..player.Name end else playerFrame.PlayerName.Text = player.Name end local sub = player:WaitForChild('Values', 3):WaitForChild('Subdivision', 3) if not sub then return end if sub.Value and sub.Value ~= '' then playerFrame:FindFirstChild('PlayerName').Text = sub.Value..' - '..player.Name local color = Color3.new(1, 1, 1) local realColor = color if require(game:GetService('ReplicatedStorage'):FindFirstChild('Modules'):FindFirstChild('SubColors'))[sub.Value] then realColor = require(game:GetService('ReplicatedStorage'):FindFirstChild('Modules'):FindFirstChild('SubColors'))[sub.Value] end playerFrame:FindFirstChild('PlayerName').TextColor3 = realColor end end end layoutOrder += 1 endend
screenGui.Ui.Main.ListHolder.UIGridLayout.CellSize = UDim2.new(1, 0, 0, screenGui.Ui.Main.AbsoluteSize.Y * uiCellScale)
task.wait(0.8)
enduserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if not (gameProcessedEvent) then
if (input.KeyCode == Enum.KeyCode.Tab) then
uiToggle = not uiToggleif (uiToggle) then tweenService:Create(screenGui.Ui.Main, TweenInfo.new(1), {Position = UDim2.fromScale(0.995, 0.01)}):Play() else tweenService:Create(screenGui.Ui.Main, TweenInfo.new(1), {Position = UDim2.fromScale(0.995 + 0.5, 0.01)}):Play() end endend
end)
