i’m trying to make an avatar editor, using item ids: it works on everything, really: but not bundles and faces (i don’t really care about the bundles), anyway
i tried to make it support faces but it didn’t work, after i put the id for a face. this happens
(roblox isn’t letting me upload, it just doesn’t give people a face.)
here’s the code i used,
-- this uses ids from a textbox to give people items
elseif v:IsA("Decal") then
face.Texture = "rbxassetid://"..number
-- face itself is a variable sending it to the players face, this isn't the entire script.
the script is in serverscriptservice, but here’s the script on the textbox either way
local event = workspace:WaitForChild("AvatarEvent")
local text
script.Parent.FocusLost:Connect(function(enter)
if not enter then return end
text = script.Parent.Text
text = text:gsub("[%a%p]+","")
local number = tonumber(text)
if not number then return end
event:FireServer(number)
end)
The problem could be that the asset ID you’re setting the face to is not an actual texture. There’s a really cool way with InsertService to grab the Texture ID for a specific face
local insertService = game:GetService("InsertService")
local function GetFaceIDFromAsset(id)
local asset = insertService:LoadAsset(id)
if (asset) then
return asset:FindFirstChildOfClass("Decal").Texture
end
end
For example, if we wanted this face in the game, the assetID itself isn’t an actual Image so it can’t be displayed on the face.