ShirtTemplate wont change shirt

Code:

local NormSpd = 16

local SpdMultiplier = 2

local Toggle = script.Parent:WaitForChild("Toggle")

Toggle.OnServerEvent:Connect(function(plr, Toggled)
	
	local Char = plr.Character
	
	if Toggled == true then
		
		if Char:FindFirstChild("Humanoid") then
			
			Char:FindFirstChild("Humanoid").WalkSpeed = NormSpd * SpdMultiplier
			
			Char.Shirt.ShirtTemplate = "rbxassetid://5228901914"
			
		end
		
	else

		if Char:FindFirstChild("Humanoid") then

			Char:FindFirstChild("Humanoid").WalkSpeed = NormSpd

		end
		
	end
	
end)

Edit: What happens is that it just shows the character’s skin color

Did you get the ID from the catalog?

yes from a catalog item.

extra text

Then it won’t work because when pasting into studio, the ID changes. So to properly get the ID, you will have to paste the ID in Studio and copy it from there. Not directly from the Catalog

Other than the wrong ID this seems to work fine. You may want to add a task.wait(1 or 2) before local Char = plr.Character to avoid any possible load error. Pretty sure then will not have that problem however.

Wdym I copied the ID from the catalog and pasted into studio

Try an ID you know for sure works, to test it.

It’s a shirt from the catalog…

Grab a dummy from the toolbox, insert a shirt into the dummy, and then paste the ID there, and then grab that ID and insert into your script.

Again … Try an ID you know for sure works, to test it.