ViewPortFrame does not load character properly

I am trying to load the player’s character inside a viewport frame. The issue is that the character loads with multiple of their body parts deleted or semi-deleted. Adding a task.wait(x) just makes it so that the character doesn’t appear at all.

local character = player.Character or player.CharacterAdded:Wait()
	if player.CharacterAppearanceLoaded then
		character.Archivable = true
		local clone = character:Clone()
		return clone
local characterClone = cloneCharacterModel(player)
		if characterClone then
			characterClone.Parent = viewportFrame
			characterClone:MoveTo(Vector3.new(0,-6,-5))

Examples of character in viewport frame:
image image image
edit: it does load with a worldmodel, but then it mimicks my movement in workspace which is not wanted

1 Like

Alright, I now know what the issue is. Apparently scripts inside of a worldModel actually work - causing the scripts to duplicate. This is fortunately an easy fix.

local children = characterClone:GetDescendants() 
			for index, child in pairs(children) do
				if child:IsA("LocalScript") then
					child:Destroy()
				end
			end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.