Shirt and pants giver doesnt work

So yeah, I created shirt giver. It was working, until I aded to this pants. It stopped working and doesnt do anything. There is just some HTTP 404 error.

local ReplicatedStorage = game.ReplicatedStorage
local RemoteEvent = ReplicatedStorage.GiveShirt
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAppearanceLoaded:Connect(function(character)
        local Temporary1 = game.StarterPlayer.StarterPlayerScripts.shirtsaver
        local Temporary2 = game.StarterPlayer.StarterPlayerScripts.pantssaver
        RemoteEvent.OnServerEvent:Connect(function(player, shirtTemplate, pantsTemplate)
            if shirtTemplate == "607785314" and pantsTemplate == "12895786339" then
                character.Shirt.ShirtTemplate = game:GetService("InsertService"):LoadAsset(shirtTemplate).Shirt.ShirtTemplate
                character.Pants.PantsTemplate = game:GetService("InsertService"):LoadAsset(pantsTemplate).Pants.PantsTemplate
                Temporary1.Value = "607785314"
                Temporary2.Value = "12895786339"
            end
        end)
        character.Shirt.ShirtTemplate = game:GetService("InsertService"):LoadAsset(tonumber(Temporary1.Value)).Shirt.ShirtTemplate
        character.Shirt.ShirtTemplate = game:GetService("InsertService"):LoadAsset(tonumber(Temporary2.Value)).Pants.PantsTemplate
    end)
end)

About temporary variable, it is to save so after reset/death, shirt and pants still stay on player. I didn’t test it yet, but I think it will not work, so I would also appreciate help with this :slight_smile:

Forgot to add client script:

local ReplicatedStorage = game.ReplicatedStorage
local RemoteEvent = ReplicatedStorage.GiveShirt

script.Parent.MouseButton1Click:Connect(function()
	RemoteEvent:FireServer("607785314", "129458426")
end)

Nevermind, Ive solved this

sadsaadsad

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.