I’m wondering if it’s possible to get a headshot image of an NPC because I’m making a story game and I want my dialogue show the NPC talk.
This is the main script for the game which is in ServerScriptService:
local status = game.ReplicatedStorage:WaitForChild("Status")
local dialogueEv = game.ReplicatedStorage.RemoteEvents.GuiEvents.Dialogue
local toggleDialogue = game.ReplicatedStorage.RemoteEvents.ToggleEvents.ToggleDialogue
local Npc = game.Workspace.NPC.Mike
local NpcImg = "rbxassetid://2128423326"
local NpcName = Npc.Name
local NpcFace = Npc.Head.face
local imgFrameType = {Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420}
local playerName
local playerImg
local function randomPlayer()
local players = game.Players:GetPlayers()
local playerNumber = math.random(1, #players)
local chosen = players[playerNumber]
playerImg = game.Players:GetUserThumbnailAsync(chosen.UserId, imgFrameType)
playerName = chosen.Name
end
wait(3)
dialogueEv:FireAllClients(NpcImg, NpcName, "This is a test dialogue.")
However, the image is basically blank. Is there any way to get the NPC image for this?