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

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

Asked by
Kegani 31
7 years ago
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

Log in to vote
0
Answered by
Kegani 31
7 years ago

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

Ad
Log in to vote
0
Answered by 7 years ago

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.

0
Error with roblox asset link. Otherwise script works perfectly. Kegani 31 — 7y

Answer this question