PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

LoadCharacterAppearance

Places the given instance either in the player’s character, head, or StarterGear based on the instance’s class.

Parameters

Name Type Default Description

Returns

Return Type Summary

Code Samples


Player:LoadCharacterAppearance

This script gives any Hat/Gear/Face/Body Part to a player once they chat the URL of the asset.

game.Players.PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        local assetId = message:match("id=(%d+)")
        if assetId then
            local model = game:GetService("InsertService"):LoadAsset(assetId)
            for _, child in pairs(model:GetChildren()) do
                player:LoadCharacterAppearance(child)
            end
        end
    end)
end)