Clothing is not rendering in ViewportFrames

It’s being cloned over but not rendering, I assume it’s an issue with loading, as far as I know when I tested it a while back, making a delay for clothing doesn’t fix the issue either.

Can we see your script please?__

ofc

 local Camera = Instance.new("Camera")
 Camera.Parent = script.Parent
 Camera.CFrame = CFrame.new(0,0,0)
 
 game:GetService("RunService").RenderStepped:Connect(function()
 	script.Parent.CharacterPreview.CurrentCamera = Camera
 	if game.Players.LocalPlayer.Character ~= nil then
 		if script.Parent.CharacterPreview.Visible == true then
 			for i,v in pairs(script.Parent.CharacterPreview:GetDescendants()) do
 				v:Destroy()
 			end
 			for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
 				if v:IsA("BasePart") or v:IsA("Part") or v.Name == "HumanoidRootPart" or v:IsA("Humanoid") or v:IsA("Pants") or v:IsA("Shirt") then
 					local clone = v:Clone()
 					clone.Parent = script.Parent.CharacterPreview
 					if clone.Name == "HumanoidRootPart" then
 						Camera.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -7) * CFrame.Angles(0, math.rad(180), 0)
 						--clone.CFrame = CFrame.new(-0, 0.5, -6.499) * CFrame.Angles(0, 180, )
 						--clone.Position = Vector3.new(-0, 0.5, -6.499)
 					--	clone.Orientation = Vector3.new(0, 180, 0)
 					end
 				end
 			end
 		end
 	end
 end)```


Edit 1 :  fixed formatting
Edit 2 :  That's good enough I reckon.

You can also format your code using three of these: ` (it is the key above the tab and below the esc)
Screen Shot 2021-03-29 at 5.11.16 PM
Also why are you creating a new clone multiple times a second? It is happening so fast that the clothing probably doesn’t have time to render. You could just connect it to a player.CharacterAdded event instead.

1 Like

It’s a live preview, Think the arsenal player preview, It works perfectly fine in new-ish videos.

1 Like

Yeah I really don’t know, I’m sorry. So you just are naked in the viewport frame?

Yes, meshes and textures render though, clothing just doesnt.

1 Like

Clothing doesn’t render through ViewportFrames. To achieve this you need to add textures onto individual body parts.

2 Likes

That’s so annoying, are the textures uvs set correctly on its own or will I have to edit them?
Why isn’t this better documented too? Why can’t we render clothing in viewport frames?

NOPE!! looks like putting it in a model fixes it!, but thanks!

2 Likes