I’m trying to make a donator perk UI similar to @TheFurryFish’s Basic Admin Donator Perks, and I’m wondering how would I get the asset id/texture of the face when the face id is entered.
User enters faceid from catalog → Script finds the texture/asset id of the face → Script changes face to new face - How would I accomplish this? Any help is appreciated.
Do you mean how you would fire the event to the server and change the player’s face? As in, do you need to know how the commands work in the UI or just applying the texture?
I’m not trying to get the thing they have entered. I’m trying to get the texture id, from a face id being entered. As roblox uses texture IDs instead of actual catalog face ids for faces in games.
So using InsertService, you can get any asset from the catalog and put them in the studio, this applies for accessories and faces. The LoadAsset function returns a model containing the Instance from the asset. In this case, putting a face Id will return a model containing a Decal with the ImageID.
In conclusion:
local InsertService = game:GetService("InsertService")
function GetFaceImage(FaceID) --the ID from the catalog
local AssetModel = InsertService:LoadAsset(FaceID)
if AssetModel then
return AssetModel:FindFirstChildOfClass("Decal").Texture --the ImageID for the face
end
end
I hope this site explains you what you need, you also can use the Name instead of the ID, and then COMPARE the id with all the id of the array and return a decal if both id‘s matches.