I’m trying to add avatars into leaderboards but I’m lost out of options because I can only find topics on the WorldModel instance.
function LeaderboardController:LoadAvatar(userId,place)
local avatar = place.Avatar
if avatar then
local humanoidDescription = Players:GetHumanoidDescriptionFromUserId(userId)
local rig = ReplicatedStorage.Rig:Clone()
local newCam = Instance.new("Camera")
newCam.Parent = avatar
rig.Parent = avatar.WorldModel
rig.Humanoid:ApplyDescription(humanoidDescription)
avatar.CurrentCamera = newCam
local pivot = rig:GetPivot()
newCam.CFrame = CFrame.lookAt(pivot.Position + Vector3.new(0,10,-10),pivot.Position)
for _,part in ipairs(rig:GetChildren()) do
if part:IsA("BasePart") then
part.Anchored = true
end
end
end
end