ShirtTemplate and PantsTemplate links get automatically deleted after a certain period of time

Started noticing in the past week that new Character models in my game “Shonen Unleashed” have been missing their clothes, as noticed by the players. Upon further inspection in Studio, the ShirtTemplate and PantsTemplate for their clothes have had their links completely removed without me or any other developer doing so. What makes it more strange is the fact that even after I add back the links, they still get deleted after some interval. You can investigate this issue in the games “Shonen Unleashed” and “Testing Server” from my group “Shonen Unleashed”.

19 Likes

I’m having the exact same issue. Other team members also experienced it in others games.

2 Likes

20 days later this still hasn’t been looked at? it’s been affecting me for the last few days and ive had to resort to using stringvalues to hold templates because actual clothes keep deleting the template

3 Likes

I found a workaround for anyone who sees this post and has run into the issue. From what I’ve seen, copy pasting clothes is what causes the IDs to get removed later, the fix I found was to update IDs manually of any clothes that get deleted, instead of copy pasting the actual instance.

Will try that, hope it works. It’s so annoying everytime I open my place every template get deleted.

EDIT: Didn’t work for me, still got it deleted after a while.

1 Like

Was running into this issue too and couldn’t figure out what was going on. Whenever I copied over a model that contained “Shirt” or “Pants” objects, their ShirtTemplate and PantsTemplate values looked correct in studio, but in-game their values were being nullified/set to an empty string. This maybe suggests something is wrong with their serialization or copy/paste stuff.

I asked the AI Assistant to “reset” all the shirt and pants objects and it spit out a script:

local Selection = game:GetService("Selection")
local selected = Selection:Get()[1]
if selected and selected:IsA("Model") then
    local shirts = {}
	local pants = {}
    for _, obj in ipairs(selected:GetDescendants()) do
        if obj:IsA("Shirt") then
            local oldTemplate = obj.ShirtTemplate
            table.insert(shirts, {shirt = obj, template = oldTemplate})
            obj.ShirtTemplate = ""
		elseif obj:IsA("Pants") then
			local oldTemplate = obj.PantsTemplate
            table.insert(pants, {pants = obj, template = oldTemplate})
            obj.PantsTemplate = ""
        end
    end
    task.wait(0.1)
    for _, entry in next, shirts do
        if entry.shirt then
            entry.shirt.ShirtTemplate = entry.template
        end
    end
	for _, entry in next, pants do
        if entry.pants then
            entry.pants.PantsTemplate = entry.template
        end
    end
else
    warn("Please select a model.")
end

If I copy/paste a model and then run this script while selecting the model in the explorer, this fixes the issue for me. Sucks that I’ll basically have to run this every time when copying over anything that has these objects… lol

NOTE: I did need to delete old models that had this issue for a long time. The script above didn’t work on them. Once I replaced the model and ran the script, the replacement values seemed to work

I have been experiencing this issue for a while as well. Even now it doesn’t seem to be fixed, and the solution of manually updating IDs doesn’t seem to work 100% of the time

1 Like

The workaround I found is: Once you insert the Character, duplicate it (make sure it fully loads first) and delete the original model.

It seems this issue happens when you first copy paste/insert a character in Studio. Once the Character texture is loaded, further copies will retain the clothing, but not the original model. Here’s a video of it in action:

Really hoping it gets fixed soon though. Even with the workaround, sometimes you just forget and we’ve had 5 instances of characters losing their clothing, but thankfully all of them were caught before it was made to the public.

1 Like

Do you think you could provide a clear set of repro steps for this bug? There’s a lot of ways to insert a character, and also not sure if the “interval” here could be on Studio restart, publish, or similar.

Hey, here’s how I managed to consistently replicate it:

  1. Open an empty Baseplate (Ctrl + N )
  2. Create a new Rig using Avatar → Rig Builder (It happens on both R15 and R6 rigs)
  3. Insert a Shirt into the Rig, and paste a Clothing ID on the ShirtTemplate
  4. Open another Place that is published and with Team Create ON
  5. Copy the Rig from the empty baseplate, and paste it on the Team Create place.
  6. Close and re-open the Team Create place.

I have a video of it here (sorry for the quality):

1 Like

Just here to echo everyone else’s posts: this is happening to us and affecting our game. NPCs suddenly becoming naked is no bueno.

3 Likes

This has happened to me multiple times today, and it is really frustrating.

1 Like

Thought I had found a solution by updating the links of all clothes with the new asset id (rbxassetid://) it worked for a bit and I thought I was in the clear, and today all clothes are now gone again. I’m a bit frustrated that this is still happening, has anyone found an actual solution? Updating the ids by pressing enter manually on each one is something I’ve heard but that is extremely tedious.

1 Like

Is it not fixed yet? it has been happening to my game for the past few weeks already, and this was roblox’s answer for my bug report, Of course i’ve tried it but it still ended up without any results


https://en.help.roblox.com/hc/en-us/articles/203552894-General-Roblox-Studio-Issues

2 Likes

I’ve been getting this issue across multiple games too.

A shame this hasn’t been fixed yet. It has demotivated me from working on my game, as no matter what solutions given in this (or similar) threads, the issue still reoccurs when Studio restarts / when the game is published. Looks like my game will stay privated until this is solved.

1 Like

It seems to only be occurring in Workspace, so our work around for our game has been to clone everything from server storage so clothes don’t get yoinked.

Hopefully they will fix it soon, but in the meantime that’s how we’re forced to do it.

Still occurring across multiple games for me. For now I have a workaround of storing clothing IDs in a module and having a script apply the corresponding clothing IDs when the character is added. That’s the only way I could prevent the characters from appearing naked, the IDs get removed after a day or two and I’ve just had to leave it that way in studio while the script patches them in-game.

I noticed the issue doesn’t seem to be specific to certain clothing IDs. I have two NPCs with the same clothing IDs and nearly identical models and hierarchies. One randomly lost its Shirt and Pants templates, but the other did not.

It happens everywhere. I’ve tried storing them in ServerStorage, StarterGui, etc. Only clothes that I had set from before last month have saved in workspace. They’ve been deleted everywhere else. In order to get the clothes back I have to grab them from a 2 month old autosave, but they get deleted again pretty fast.

1 Like