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

How would you fix this script?

Asked by 10 years ago

What the script does is deletes the players clothing/packages and replaces it with a zombie head, the zombie package and different body colors

while true do
    local Player = LocalScript.Parent
if Player ~= nil then
    Player.TeamColor = game.Teams.Zombies.TeamColor
    Player:WaitForChild(Shirt)
Player.Shirt:Destroy()
    Player:WaitForChild(Pants)
Player.Pants:Destroy()
    Player:WaitForChild(BodyColors)
b=Player.BodyColors
    b.HeadColor = "Medium Green"
b.LeftArmColor = "Medium Green"
    b.LeftLegColor = "Brown"
b.RightArmColor = "Medium Green"
    b.RightLegColor = "Brown"
b.TorsoColor = "Brown"
    Player:WaitForChild(ShirtGraphic)
Player.ShirtGraphic:Destroy()
for _, v in pairs(Player:GetChildren()) do
    if v:IsA("Accoutrement") then
     v:Destroy()
Player:WaitForChild(CharacterMesh)
Player.CharacterMesh:Destroy()

end
    end
end

Instance.new("Hat",Player)
    Instance.new("Part",Player.Hat)
Instance.new("Mesh",Player.Hat)
m=Player.Hat.Part.Mesh
        m.MeshId = ("rbxassetid://24477146")
    m.TextureId = ("rbxassetid://25289515")
    Instance.new("CharacterMesh",Player)
    Player.CharacterMesh:WaitForChild()
        Player.CharacterMesh.Name = "LeftArm"
        Player.LeftArm.MeshId = ("rbxassetid://24477146")
            Player.LeftArm.OverlayTextureId = ("rbxassetid://37686282")

            Instance.new("CharacterMesh",Player)
    Player.CharacterMesh:WaitForChild()
        Player.CharacterMesh.Name = "LeftLeg"
        Player.LeftArm.MeshId = ("rbxassetid://37683150")
            Player.LeftArm.OverlayTextureId = ("rbxassetid://37687646")

            Instance.new("CharacterMesh",Player)
    Player.CharacterMesh:WaitForChild()
        Player.CharacterMesh.Name = "RightArm"
        Player.LeftArm.MeshId = ("rbxassetid://37683174")
            Player.LeftArm.OverlayTextureId = ("rbxassetid://37686282")

            Instance.new("CharacterMesh",Player)
    Player.CharacterMesh:WaitForChild()
        Player.CharacterMesh.Name = "RightLeg"
        Player.LeftArm.MeshId = ("rbxassetid://37683227")
            Player.LeftArm.OverlayTextureId = ("rbxassetid://37687646")

            Instance.new("CharacterMesh",Player)
    Player.CharacterMesh:WaitForChild()
        Player.CharacterMesh.Name = "Torso"
        Player.LeftArm.MeshId = ("rbxassetid://37683263")
            Player.LeftArm.OverlayTextureId = ("rbxassetid://0")






end
    end
end
1
WaitForChild() is supposed to be strings, yo. Inexperienced 125 — 10y

Answer this question