Issues with Equipping Shirts

Hey guys! So I’m trying to rescript an old system of equipping clothing for use with my new system and GUIs. I’m having an issue with this code.

function onClick(mouse)
	local playerName = script.Parent.Parent.Parent.Parent.Parent.Name
	local id = script.Parent:WaitForChild("ID")
	local realID = id.Value
	local assetURL = ""
	local completedURL = assetURL..realID
	local actualPlayer = game.Workspace:FindFirstChild(playerName)
	local shirt = actualPlayer:FindFirstChildOfClass("Shirt") 
	if not shirt then
		local shirt ="Shirt")
		shirt.ShirtTemplate = completedURL
		shirt.Parent = actualPlayer
		shirt.Name = "Shirt"
		local shirt ="Shirt")
		shirt.ShirtTemplate = completedURL
		shirt.Parent = actualPlayer
		local currentShirt = actualPlayer:FindFirstChild("Shirt")
		shirt.Name = "Shirt"


When I run it, it does indeed remove the shirt, but returns this error and does not equip my new one, just defaults to my torso presets.
Image “” failed to load in “Workspace.itsokayepic.Humanoid.Clothes”: Request failed

Can anyone help?

Thanks in advance.

1 Like

You have to make sure you own/your group owns the clothing, I believe that’s is how it is setup but I could be wrong, I assume it’s the same reason animations fail to load. To “own” the clothing all you need to do is place it in workspace and save it to roblox, which will save it under your name. If you did this, it also takes time for these things to be moderated.

I believe your roblox asset id is wrong, i believe it should be “rbxassetid://“ or something like that, just paste the id into the shirt object and copy the rbxassetid link

Im pretty sure you have to own the shirt. Has anyone else had these problems? If not, you have done something wrong in your script.
I do not really see the error in the script though?
Also, asset id is incorrect.

I don’t believe this is how it works, saving shirts to a model will only save it as just that, a model. You can use any clothes regardless if you own them or not.

My method of concatenating with the assetURL does work, it’s just maybe a little outdated. I believe it may be the issue like y’all stated where if I don’t own the clothes I can’t use it in my model. I’ll see, can anyone else confirm this?

Ok. So it still doesn’t work after having changed my asset URL. I don’t think it’s an issue with me not owning the shirts either, because other models I’ve created have done this with others shirts. Can anyone help?