Every time I use my script to change the clothes someone is wearing when they press a gui button it returns this error in my output window:
16:29:44.153 - Image "https://assetgame.roblox.com/asset/?id=2186701982" failed to load in "Workspace.Oxygen4Lyfe.Humanoid.Clothes": Request failed 16:29:44.175 - Image "https://assetgame.roblox.com/asset/?id=952303920" failed to load in "Workspace.Oxygen4Lyfe.Humanoid.Clothes": Request failed
It keeps failing to load the asset for the clothes even though the clothes are not removed from Roblox, the code is run through a remote event, and the clothing templates do change in both the pants and shirt.
Script:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local createPartEvent = Instance.new("RemoteEvent", ReplicatedStorage) createPartEvent.Name = "ChangeOutfitTo1Event" local function onChangeOutfitTo1Fired(player) local shirt = player.Character.Shirt local pants = player.Character.Pants shirt.ShirtTemplate = "rbxassetid://1541143359" pants.PantsTemplate = "rbxassetid://1541144106" print("Changed "..player.Name.."'s outfit to outfit 1!") end createPartEvent.OnServerEvent:Connect(onChangeOutfitTo1Fired)
Shirt: https://www.roblox.com/catalog/1541143359/Alterra-Radiation-Suit
Pants: https://www.roblox.com/catalog/1541144106/Alterra-Radiation-Suit
I have tried using the full urls instead of "rbxassetid://", but it makes no difference. If anybody could supply a solution I would very much appreciate it.