Yeah https://assetdelivery.roblox.com is a good way to get FileMeshs for a plugin for example. Here is what he should do to his scripts. Add the following code to the local script
--Local Script in your button
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local button = script.Parent -- your decalApply button
local textBox = button.Parent:WaitForChild("FaceInputBox") --This would be your text box you put the id in
local applyFaceEvent = ReplicatedStorage:WaitForChild("ApplyFaceEvent")--Event to send the id to the server script
button.MouseButton1Click:Connect(function()
local assetId = tonumber(textBox.Text)
if assetId then
applyFaceEvent:FireServer(assetId)
else
warn("Invalid Asset ID entered.")
end
end)
Add a server script with the following code
--Server Script in ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local InsertService = game:GetService("InsertService")
local applyFaceEvent = ReplicatedStorage:WaitForChild("ApplyFaceEvent")
applyFaceEvent.OnServerEvent:Connect(function(player, assetId) --hearing the call from the client
if not tonumber(assetId) then
warn("Invalid Asset ID")
return
end
local success, insertedAsset = pcall(function()
return InsertService:LoadAsset(assetId) -- inserting a asset with the id we got from the client
end)
if not success or not insertedAsset then
warn("Failed to load asset with ID:", assetId)
return
end
-- Try to find the Decal inside the asset
local decal = insertedAsset:FindFirstChildWhichIsA("Decal", true) -- getting a decal from the asset
if not decal then
warn("No Decal found in asset")
insertedAsset:Destroy() -- if no decal destroy the asset
return
end
local textureId = decal.Texture -- getting the texture id from the decal
insertedAsset:Destroy() -- destroying the asset
-- Apply the texture to the character's face
local character = player.Character or player.CharacterAdded:Wait()
local head = character:FindFirstChild("Head")
if not head then return end
local existingFace = head:FindFirstChildOfClass("Decal")
if existingFace then
existingFace:Destroy()
end
-- Asset going on the head
local newFace = Instance.new("Decal")
newFace.Name = "Face"
newFace.Face = Enum.NormalId.Front
newFace.Texture = textureId
newFace.Parent = head
print("Applied texture:", textureId)
end)
This method 100% works:) Roblox should add texture ids to marketplace service like asset ids.