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

[Solved] How to add a player avatar GamePass?

Asked by 5 years ago
Edited 5 years ago

I am trying to make all the players look like a farmer. I have the Asset Id's for everything (shirt, face, pants, etc.) and I can either use the game settings in Studio or, like I am now, use a model named "StarterCharacter" placed in StarterPlayer.

My question is, what is the best, reversible, way to force every player without this GamePass to be a farmer, letting those with the GamePass be their own character?

Note: With the game settings in studio that force a player's face, pants, shirt,legs, arms, torso, etc. to what you set... I have created a script to remove all other accessories and, effectively make the character look like a farmer Catch: Using this, I cannot allow the character to be their own appearance because the game settings force it.

Script described above:

while wait(1) do
    local players = game.Players:GetPlayers()
    for i, plr in pairs(players) do
        repeat wait() until plr.Character and plr.Character:FindFirstChild("Humanoid")
        local char = plr.Character
        for i, v in pairs(char:GetChildren()) do
            if v.ClassName == "Accessory" or v.ClassName == "Hat" then
                if v.Name ~= "GameHat13" then --GameHat13 is a hat i give them in another script
                    v:Destroy()
                else
                end
            end
        end
    end
end

Any help or advice would be appreciated!

0
Maybe check when a character spawns, and if they don't own a gamepass respawn them as a farmer, else let them spawn as they would negativize 0 — 5y
0
Thanks for the idea, tried that... just had another idea, I’ll use the script above and game settings, thanks anyway! KamikazeJAM108867 38 — 5y

Answer this question