How to insert a model into a Viewport

Even client-side, it will not even display the body at all

EditedModel.rbxm (6.5 KB)
So it took me a while because I’ve never worked with ViewportFrame ever. But after researching I’ve come to a better understanding. For this model, place the LocalScript in StarterPlayer.StarterPlayerScripts, place Face in Workspace, and place SurfaceGui in StarterGui.

In my experience, I set the Adornee of the SurfaceGui to Face, placed a wait() after the character construct function call, moved everything to a local script, and placed SurfaceGui into StarterGui.

[1st edit] I’ve no idea why you can’t just leave the SurfaceGui in the Face part and leave Adornee blank.

[2nd edit] I don’t think ViewportFrame works if it is not in PlayerGui. Therefore you must put SurfaceGui in PlayerGui (game.Players.LocalPlayer.PlayerGui (which StarterGui will do for you)), and then set the Adornee of the SurfaceGui to the part. But only if it has a ViewportFrame.

2 Likes

I can’t thank you enough, thank you very much

While doing a bit of tinkering, I believe it would be a good idea to load the avatar into Workspace first, then move it back into the Viewport because for some reason all of the accessories and attachments mess up
E.g.

char.Parent = game.Workspace
wait(2)
char.Parent = vp

Without:


With:

1 Like