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.
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
UserId is not getting removed, but Roblox will soon change their TOS so that any reference to a player outside of their platform (external data-storage) will be required to use the User datatype. Which is a problem because external data-stores don’t work with it.
Is it possible to get the HD version of an Avatar Background on the Client? As in the Image ID that’s used in the Model. Or is the Server loading in the Asset as a Model, then extracting the Image from there, required
Unfortunately this is the only method I know of, I don’t know how I could get the model without having to load it in the server first then extracting the image id from it.
Is there a source for this supposed change they are making? Pretty sure they aren’t requiring it and any games using UserId for external data will be unaffected unless they were doing cross-game data (in which case, still a non-issue since they confirmed there will be an API to request a user’s consent for sharing their global UserId, just hopefully it does actually release before the update goes full effect)