Getting a Player's Background Image

local function GetPlayerBackground(UserID : number)
	local BGID = game:GetService('Players'):GetProfileConfigurationFromUserIdAsync(UserID).BackgroundAssetId or 0
	local Background = game:GetService('InsertService'):LoadAsset(BGID):WaitForChild('AvatarBackground')
	local BackgroundImage = Background.ImageId.Value
	local BackgroundColor = Background.Color.Value
	
	Background:Destroy()

	return BackgroundImage, BackgroundColor
end
-- example: 
local BGid, BGColor = GetPlayerBackground(PLAYER.UserId)
PlaceholderImage.Image = 'rbxassetid://'..BGid

after making this post, i wanted to figure out a way to get the actual image asset ID of the player’s background, and after a couple of minutes of experimenting i found out how to.

hope that someone finds this helpful!

4 Likes

Even better, you could ditch the Player argument entirely and take the UserID so that it works for non-joined players too. Also, destroy the Background after being done with it

1 Like

great idea! i’ll edit it in a sec