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

How Do I make A Team Package Remover?

Asked by
iFurzy 35
8 years ago

When you are on a certain team (ex: mid grey) your package is removed.

1 answer

Log in to vote
0
Answered by
xuefei123 214 Moderation Voter
8 years ago

You need to make a playeradded function and get their team;

game.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function()
        if plr.TeamColor == "Mild grey" then
            for i,v in pairs(plr.Character)
                if v.ClassName == "CharacterMesh" then
                    v:Destroy()
                end
            end
        end
            end)
        end)
    end)
end)

Explanation here:

game.PlayerAdded:connect(function(plr)--Gets the new player
    plr.CharacterAdded:connect(function()--Waits until their character has loaded
        if plr.TeamColor == "Mild grey" then--If they are on that team then yeah
            for i,v in pairs(plr.Character)--Loops through the character
                if v.ClassName == "CharacterMesh" then--CharacterMeshes are the package meshes that are put onto the character
                    v:Destroy()--Get rid of them
                end
            end
        end
            end)
        end)
    end)
end)

If this helped, or answered your question don't forget to accept the answer, it gives us both rep

Ad

Answer this question