I am working on making an in-game catalog. Currently, when the player tries on layered clothing, it applies correctly to the player but not the player’s clone in the viewport. I am not sure if this has to do with me applying it via the client or if there is something else I am doing wrong.
Unfortunately, that did not work. Based on the date of that article, it is possible that they are referring to classic clothing (shirt, pants, t-shirt) not rendering, not layered clothing.
Hmmm, tomorrow once I get home I will try seeing how I could help you out.
But for now I suggest you to try wandering around the forum and also thinking on ideas yourself.
Altho if cloning the character did not work then I am not entirely sure what else could do the job, maybe try applying a HumanoidDescription with the layered clothing on the preview char, dunno, all I know is that layered clothing and viewport frames are very buggy lol.
Okay, there could MAYBE be a high chance that they do not have compatibility with layered clothing, which wouldn’t be surprising since ViewportFrames LACKS on several features, such as skyboxes, anti-aliasing, etc., so… /shrug
Well, since I’m not on my computer rn I can only take blind guesses…
What if you try the catalog thing in-game?
By in-game I actually mean publishing the game and then running it from the ROBLOX website.
There are several weird bugs that only exists in Studio, like UserInputService not registering the “I” and “O” keys, outside of Studio they are registered just fine.
This might sound weird but:
Try creating the model ON the server and then pass it through a remote to the client, then ask the client to put it in the Viewport
I don’t know why but this could be the case…
(To not actually need to develop the entire remote process to test it out, make a dummy with a random layered clothing, run the simulation, go to your client, and parent the model to the Viewport, check if the layered clothing breaks or not)
I just tried something similar to that with no success. When the player joined and their character was added I tried creating the fake character on the server, then parenting it to the viewport. Sadly, it still broke the clothing.
Well, well, well… This is gonna be quite annoying to solve, for sure.
What method you were using to display the character before running into the layered clothing issue?
Feel free to post a bit of the script here so I could try figuring out a workaround.
Well, what if you try placing the rig DIRECTLY under the ViewportFrame, without utilizing the WorldModel?
I’ve seen lots of people utilize WorldModels for Viewports but I’ve personally never seen any difference between using it and not using it.
I hardly think the WorldModel is interfering on the layered clothing rendering, but we could always try removing it just to be sure it isn’t the issue.
--Place this in a LocalScript inside of ReplicatedFirst.
repeat wait() until game:IsLoaded()
local pl,sc,wm,vw,vwc=game.Players.LocalPlayer,Instance.new("ScreenGui"),Instance.new("WorldModel"),Instance.new("ViewportFrame"),Instance.new("Camera") sc.Parent,vw.Size,vw.CurrentCamera,vw.Parent,wm.Parent,vwc.Parent=pl:WaitForChild("PlayerGui"),UDim2.new(0.5,0,0.5,0),vwc,sc,vw,vw
local ch=pl.Character or pl.CharacterAdded:Wait()
repeat wait() until (ch:FindFirstChildWhichIsA("Humanoid",true) and ch:FindFirstChildWhichIsA("HumanoidDescription",true))
local vwm=game.Players:CreateHumanoidModelFromDescription(ch:FindFirstChildWhichIsA("HumanoidDescription",true),ch:FindFirstChildWhichIsA("Humanoid").RigType)
game:GetService("ContentProvider"):PreloadAsync({vwm})
vwm:SetPrimaryPartCFrame(CFrame.new(0,vwm:FindFirstChildWhichIsA("Humanoid").HipHeight+vwm.PrimaryPart.Size.Y/2,0))
vwm.Name,vwm.Parent,vwc.CFrame="ViewmodelRig",wm,CFrame.new(Vector3.new(0,5,-5),vwm.PrimaryPart.Position+Vector3.new(0,1,0))
ALL WE HAD TO DO WAS PRE-LOAD THE MODEL USING THE CONTENT PROVIDER SERVICE!
The answer to the question is to preload the model using content provider service (as stated in the solution post), not the code provided. The code is simply an example of how to use it IN MY CASE. Anyone who comes along this post shouldn’t even need the code.