But its actually there, even in studio and in game
Script:
I am testing it so I’ve made it work with some key on pc
local gui = game.ReplicatedStorage:WaitForChild("LeaderboardGuiFrame")
local uis = game:GetService("UserInputService")
local function getplayers()
if uis.KeyboardEnabled == true then
for i = 1,#game.Players:GetPlayers() do
local clone = gui:Clone()
local currentplayer = game.Players:GetPlayers()[i]
clone.PlayerName.Text = currentplayer.Name
clone.PlayerDisplayName.Text = currentplayer.DisplayName
clone.Parent = script.Parent
clone.PlayerImage.Image = game.Players:GetUserThumbnailAsync(currentplayer.UserId,Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size100x100)
clone.Position = UDim2.new(0,0,0.05,0)
end
end
end
uis.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.L then
getplayers()
end
end)
Are you adding the PlayerImage object at a later time in the Gui? You could just print every children of the clone and check what everything outputs back
for _, Object in pairs(clone:GetChildren()) do
print(Object)
end
Could you provide some more information regarding your problem as of where some certain instances are located in the explorer at and line of code? Or sharing the file if you don’t mind.
local gui = game.ReplicatedStorage:WaitForChild("LeaderboardGuiFrame")
local uis = game:GetService("UserInputService")
local function getplayers()
if uis.KeyboardEnabled == true then
for i = 1,#game.Players:GetPlayers() do
local clone = gui:Clone()
wait(5)
local currentplayer = game.Players:GetPlayers()[i]
clone.PlayerName.Text = currentplayer.Name
clone.PlayerDisplayName.Text = currentplayer.DisplayName
clone.Parent = script.Parent
clone:WaitForChild("PlayerImage").Image = game.Players:GetUserThumbnailAsync(currentplayer.UserId,Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size100x100)
clone.Position = UDim2.new(0,0,0.05,0)
end
end
end
uis.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.L then
getplayers()
end
end)
I think I know now. When you join the game, instead of going to starter player gui, go to this path:
Players>Woodx>PlayerGui>…
and then find the path to your leaderboardGuiFrame and check if it is there. I suspect that it might not be there, so that means you called Destroy() on the object. Check for script where you destroyed the player image