HumanoidDescription not Being Applied

I’m trying to use a RemoteFunction to have the server apply a HumanoidDescription to a dummy in a viewport frame. I’m applying the player’s HumanoidDescription to the dummy, but it isn’t working. The dummy doesn’t look like the player.

This is a snippet of the LocalScript that invokes the RemoteFunction.

--Move gui
local loadingGui = script.Parent:WaitForChild("LoadingGui")
apply:InvokeServer(loadingGui.LoadingText.ViewportFrame)
loadingGui = loadingGui:Clone()

And this is a snippet of the server script that actually applies the HumanoidDescription.

game.ReplicatedStorage.DescriptionApply.OnServerInvoke = function(player, viewport)
	--viewport.WorldModel.Character.Humanoid:ApplyDescription(player.Character:WaitForChild("Humanoid"):WaitForChild("HumanoidDescription"))
	viewport.WorldModel.Character.Humanoid:ApplyDescription(players:GetHumanoidDescriptionFromUserId(player.UserId))
	return nil
end
  1. What do you want to achieve? I want to make a dummy in a viewport frame look like the player.

  2. What is the issue? The HumanoidDescription does not seem to get applied, and I don’t know why.

  3. What solutions have you tried so far? I tried looking at the developer hub, and searched for other topics here.

Just as additional information, the viewport frame is in a ScreenGui in ReplicatedFirst, being cloned to the player’s PlayerGui.

Is the viewport frame purely client-side? Just from a glance, I suspect that if you print(viewport) inside the server script only nil will be printed because that viewport (and the humanoid inside it) doesn’t exist server side.

It does exist on the server, and if it were nil, the script would error, and no errors or warning appear in the output.

It doesn’t show an error because you are not giving the server the cloned loadingGui that you are parenting to the player’s PlayerGui. Since you are giving it the original loadingGui, the server is successfully modifying it, but it is not being replicated to the client.

So what would happen if you give it the one you cloned locally? Well, like @123marble said, it would be nil.

Since you are working with GUIs, and your goal is to show the LocalPlayer’s character in a viewport frame it would be better if you worked purely on the client side. Your best bet is probably going to be cloning the player’s character and placing it properly in the viewport frame.