Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Broken Script? Please Help.

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I just made a clothing force script where when a player joins the game, they will automatically wear the clothing IDS that are in the script. Here it is.

local shirtemplate = "174326030" -- Shirt ID
local pantstemplate = "174326065" -- Pants ID {I verified and they are true clothes forsale}

function giveShirtAndPants(p)
    local c = p.Character
    c.Shirt.ShirtTemplate = shirtemplate
    c.Pants.PantsTemplate = shirtemplate
end

game.Players.PlayerAdded:connect(function(p)
    repeat wait() until p ~= nil
    repeat wait() until p.Character ~= nil
    giveShirtAndPants(p)
    p.CharacterAdded:connect(function(c)
        repeat wait() until c ~= nil

        giveShirtAndPants(p)
    end)
end)

However, the Clothing on the User's Avatar stays the same as their default clothes.

Any help would be GREAT.

Thanks!

1 answer

Log in to vote
0
Answered by
Redbullusa 1580 Moderation Voter
9 years ago

Anything in the output?

Other than that, you can try these IDs instead:

Shirt ID

local shirtemplate = "rbxassetid://174326029"

Pants ID

local pantstemplate = "rbxassetid://174326064"

Also, the pantstemplate variable isn't used. Perhaps you were using it for line 07?

0
Thank you! JustGimmeDaBux 18 — 9y
Ad

Answer this question