To start, my whole idea for what I’m working on is an in game shop for my group where users can click the item of clothing they want, have it displayed in a viewport on their avatar and then purchase if they wish to.
My issue is the fact the viewport is displaying the user’s character incorrectly.
The way I’m doing this is from :ApplyDescription() onto a dummy and then rendering that dummy into the viewport.
Once the player has joined, it takes the asset info being used in the player and pastes it into the dummy, then displays the dummy on the UI.
However, it seems to be trying to render the user too quickly, since in all tries it has only rendered the legs and arms and clothing, but the torso, hats, and head are not rendered.
I think this is caused from trying to render before the user has fully spawned into the game.
Scripts and screenshots below.
Load character script + render character
local Players = game:GetService("Players")
game.Players.PlayerAdded:Connect(function(player)
local UserId = player.UserId
game.StarterGui.Shop.MainFrame.ViewportFrame.Dummy.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(UserId))
end)
Any advice would be helpful, thank you!