Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Shirt/Pants auto giver on player connection not working properly?

game.Players.PlayerAdded:connect(function(Player)
    wait(0.5)
    Player.CharacterAdded:connect(function(Character)
        if not Player:isInGroup(695317) then
            Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=231994962"
            Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=547993930"
			wait(1)
			
        end
    end)
end)

Basically what I tried to do was add shirt and pants to someone who is in the group 695317 (added not for testing purposes) but it looks like I got an error that said: 19:15:17.175 - MeshContentProvider failed to process rbxassetid://& because 'could not fetch'

2 answers

Ehh.. After dying 1 time, I found I had the outfit on. So when I die, I get the outfit... Weird...

In my opinion, this script is obsolete.

It is much easier to set the characters clothing using one of the preset folders. StarterCharacterScripts will run the script every time the player spawns.

LocalScript in game.StarterPlayer.StarterCharacterScripts

if not game.Players.LocalPlayer:isInGroup(695317) then
	wait(0.1)
            game.Players.LocalPlayer.Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=231994962"
            game.Players.LocalPlayer.Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=547993930"
end

If you only want it to affect the player one time, it would be in StarterPlayerScripts.

1 comment

0

Error with roblox asset link. Otherwise script works perfectly.

This discussion is preserved as it was. New answers, comments, and votes are closed.