Players get clothes in studio test, but not in game?

I have a script that will give players certain clothes if they’re in a group, or on a team. This works completely fine in studio test… yet in game it doesn’t do anything. There’s no errors and I double checked that the assetID’s were assetID’s and not catalog IDs. I’m completely lost as to what to do at this point. The script is a serverscript in serverscriptservice.

Here’s the code that gives the clothes:

function ClothesGiver(Player)

local Character = Player.Character






The code seemed to work for me.

Does the script actually execute while playing the game, or does something else specific happen?

Have you made sure that Roblox has not moderated the assets, causing them to not appear in-game? If they have been moderated, try reuploading the asset.

If that’s not the case, try pre-loading them (using ContentProvider:PreloadAsync()) before you add them to your Character.

local ContentProvider = game:GetService("ContentProvider")

function ClothesGiver(Player)
   local Character = Player.Character

   local Shirt =“Shirt”)
   Shirt.ShirtTemplate = “” .. L_shirt_ID

   local Pants =“Pants”)
   Pants.PantsTemplate = “” .. L_pants_ID

   ContentProvider:PreloadAsync({Shirt, Pants})
   Shirt.Parent = Character
   Pants.Parent = Character

I’ve noticed an uptick in issues with Collaborative Editing lately. Have you checked if your changes were committed?

According to this post:
“(Play Solo uses the edited source in your drafts, Team Test uses the server version of the script)”