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

How would I remove the Players Clothes and Tools?

Asked by 10 years ago

Instead of repeating :remove() a bunch of times how would I Remove() the random players clothes and their tools? Thanks! :D

game.Players.PlayerAdded:connect(function(player)
    g = game.ReplicatedStorage.Main:Clone()
    g.Parent = player.PlayerGui
    wait(2)
    local players = game.Players:GetPlayers()
    zombie = players[ math.random(1, #players)]
    zombie.Character["3.0 Male Left Arm"]:Remove()
    zombie.Character["3.0 Male Left Leg"]:Remove()
    zombie.Character["3.0 Male Right Arm"]:Remove()
    zombie.Character["3.0 Male Right Leg"]:Remove()
    zombie.Character["3.0 Male Torso"]:Remove()
    zombie.Character["Body Colors"]:Remove()
    zombie.Character["Pants"]:Remove()
    zombie.Character["Shirt"]:Remove()  
end)

1 answer

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

There's a property called CanLoadCharacterAppearance that, when set to false, will prevent a player's character from being loaded. Not sure if this is exactly what you are looking for, but hopefully it will help.

game.Players.PlayerAdded:connect(function(plr)
    plr.CanLoadCharacterAppearance = false 
end)
0
I would also mention that both `remove` and `Remove` are deprecated. OP should be using `Destroy`. adark 5487 — 10y
Ad

Answer this question