Folders in PlayerGui get deleted when setting character

Whenever I set the character of the player to a new model, the folders in PlayerGui get deleted.

Here’s the only code I have.

game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function()
		task.wait(7)
		player.Character=workspace.Rig
	end)
end)

Here’s a video of what happens.
https://gyazo.com/46286138d762b63fbd05a22e9655b9a1

As a side note, when the folder exists in StarterGui when the game starts, it still gets destroyed, but it is replaced by the version in StarterGui right after. I’m not sure if this behavior is intended or not.

1 Like

Is it possible to give the rig its own player and transfer the gui there?

If I’m interpreting that correctly, I don’t think that’s possible.