Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I remove the Players Clothes and Tools?

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

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)

1 comment

0

I would also mention that both remove and Remove are deprecated. OP should be using Destroy.

This discussion is preserved as it was. New answers, comments, and votes are closed.