GetUserThumbnailAsync() without UserId

I’m trying to use GetUserThumbnailAsync() without UserId, bc i’m using StarterCharacter but idk how, thank you if you tried to help.

what do you mean by your using StarterCharacter? do you mean you’re using a local script?

I’m using a Custom Character and i want to get the UserThumbnail of it.

GetUserThumbnailAsync returns an image of an actual player, not a character

oh so you mean you’re morphing a player and then get the player thumbnail but the morph?

Yea, that’s what i’m trying but i’ll use ViewportFrameGui i think.

yes, it returns the image of the player and not the character

Btw, in the CoreGui i found something called HeadShot, and that’s from GetUserThumbnailAsync() so i think that should help me.

it wouldn’t work with GetUserThumbnailAsync() but you can take a photo of the morph then edit it and then upload as a decal

It’s called AvatarHeadShot and it’s a ModuleScript with this Source:

local CorePackages = game:GetService("CorePackages")
local CoreGui = game:GetService("CoreGui")

local InspectAndBuyFolder = script.Parent.Parent
local Roact = require(CorePackages.Roact)
local RoactRodux = require(CorePackages.RoactRodux)
local Colors = require(InspectAndBuyFolder.Colors)

local AvatarHeadShot = Roact.PureComponent:extend("AvatarHeadShot")

local RobloxGui = CoreGui:WaitForChild("RobloxGui")
local CoreGuiModules = RobloxGui:WaitForChild("Modules")

local FFlagHideAvatarHeadShotInspectAndBuy = game:DefineFastFlag("HideAvatarHeadShotInspectAndBuy", false)

local LegacyThumbnailUrls = require(CoreGuiModules.Common.LegacyThumbnailUrls)

local HEADSHOT_THUMBNAIL_SIZE = 48
local HEAD_SHOT_URL = LegacyThumbnailUrls.Headshot

function AvatarHeadShot:render()
	local playerId = self.props.playerId

	local headshotUrl = nil
	if playerId and playerId ~= "" then
		headshotUrl = HEAD_SHOT_URL:format(playerId, HEADSHOT_THUMBNAIL_SIZE, HEADSHOT_THUMBNAIL_SIZE)
	end

	-- if headshot is nil, don't render the AvatarHeadShot. For example, this will be the case when
	-- the menu is brought up by InspectPlayerFromHumanoidDescription since only a player name is expected
	if FFlagHideAvatarHeadShotInspectAndBuy and (not headshotUrl) then
		return nil
	end

	return Roact.createElement("ImageLabel", {
		Size = UDim2.new(0, 48, 0, 48),
		BackgroundColor3 = Colors.GrayBackground,
		BorderSizePixel = 0,
		Image = headshotUrl,
		LayoutOrder = 1,
	}, {
		MaskFrame = Roact.createElement("ImageLabel", {
			Size = UDim2.new(1, 0, 1, 0),
			BackgroundTransparency = 1,
			BorderSizePixel = 0,
			Image = "rbxasset://textures/ui/LuaApp/graphic/gr-avatar mask-90x90.png",
			ImageColor3 = Colors.Carbon,
		}),
	})
end

return RoactRodux.UNSTABLE_connect2(
	function(state, props)
		return {
			playerId = state.playerId,
		}
	end
)(AvatarHeadShot)

yes but that would only return this
image
and not the actual morph

edit:wait i think that’s different lol

Well, i’ll see if i can get a answer with that ModuleScript.

so this takes an image of the player character?

The function is what im trying to get, so i can use it in other things.

have you tried it?

kasjdkaksdjasdkaksdaskdajksdjak

Nvm, i’m just going to use ViewportFrameGui.

oh okay

asdasdasd

Here’s the result.

image

it worked? cool

asdasd

Yes, i just used my current camera as ViewportFrame camera, putted the character in ViewportFrame and focused on the Head.