Uniform GUI RemoteEvent issue, everything works but it doesn't give a shirt on one of them

Alright so, me and a friend were making a uniform GUI for our British military game, and we added buttons for low rank uniforms, medium rank, military police, and high rank. We have a medals system so I made myself and the owner custom uniforms with our medals, and he uploaded it for the ten robux. He then sent me the asset ID and we added a small button (which you’ll see) in the bottom for us to use for our uniform. All the buttons are locked so only certain ranks can see them. Each button fires a script in serverscriptservice to give players their uniform. (Both will be included.) BUT, the problem is that all of the shirt work, but when you attempt to get the custom uniform for me and the owner, it just takes your shirt off and makes it look like this;
image


Scripts and pictures below

LR = Low Rank
MR = Medium Rank
MP = Mili Police
MW = My/Owner’s uniform

image

To fire the event in the serverscript, this is pasted into the others but with different function names.

local plr = game.Players.LocalPlayer.Character

script.Parent.MouseButton1Click:Connect(function()

game.ReplicatedStorage.Clothing:FireServer("MR")

script.Parent.Parent.Visible = false

end)

The serverscript that runs the event to give players their uniforms

local Event = game.ReplicatedStorage.Clothing

Event.OnServerEvent:Connect(function(plr, Type)
	if Type == "HR" and plr.Character then
		print("HR")
		plr.Character.Shirt.ShirtTemplate = "rbxassetid://513567320"
		plr.Character.Pants.PantsTemplate = "rbxassetid://513570472"
	elseif Type == "LR" then
		print("LR")
		plr.Character.Pants.PantsTemplate = "rbxassetid://513568836"
		plr.Character.Shirt.ShirtTemplate = "rbxassetid://513567796"
	elseif Type == "MP" then
		print("MP")
		plr.Character.Shirt.ShirtTemplate = "rbxassetid://273280950"
		plr.Character.Pants.PantsTemplate = "rbxassetid://273281072"
	elseif Type == "MR" then
		print("MR")
		plr.Character.Shirt.ShirtTemplate = "rbxassetid://513570677"
		plr.Character.Pants.PantsTemplate = "rbxassetid://513567601"
	elseif Type == "MOWA" then
		print("MW")
		plr.Character.Shirt.ShirtTemplate = "rbxassetid://10028947661"
		plr.Character.Pants.PantsTemplate = "rbxassetid://513570472"
	end
end)

image

So yeah. If anyone can help it would be greatly appreciated. And no, it isn’t because the shirt isn’t approved because you can use admin (Such as Adonis) to do :shirt me 10028947661.

Also if anybody needs any more info, just ask and I can reply/edit. Thanks in advance to anyone.

1 Like

Do you have a shirt equipped on prior to cicking on that gui?

2 Likes

Yes, and besides the broken one, you can click multiple in a row, like click Low Rank and then MR, and then MP and it still works regardless.

1 Like

Do the prints get printed out ?

2 Likes

Try putting the ID (ex: 021381948) you see on the Roblox website into a shirt template property initially in studio, then copy that new asset id instead of “rbxassetid://513570472”

Because it comes out as “http://www.roblox.com/asset/?id=9451958701” (for the shirt I used in my game)
and that looks a lot different

Might be worth a try.

2 Likes

Yeah they print in output/F9. They all print including the broken one, but it still just makes you topless.

1 Like

Oh wow, this actually worked. Thank you!

2 Likes