Basically, I want to remove hats, tshirts and whatever else that allows the player to be customized or different from others.
banned = {"T-shirt", "Shirt", "Pants", "Hat"} game.Players.PlayerAdded:connect(function(player) --[[local Stats = Instance.new("Model" ,player) Stats.Name = "leaderstats" local SPoints = Instance.new("IntValue",Stats) SPoints.Name = "Points"]] -- dont worry about this :p parts = player.Character:GetChildren() for _, p in pairs(parts) do -- dunno what to do here... end end)
A T-Shirt object is actually called a ShirtGraphic
Inside your PlayerAdded event, use the following:
player.CharacterAdded:connect(function(char) --We use the CharacterAdded event so we remove it every time the player spawns local parts = char:GetChildren() for _, p in pairs(parts) do for _, b in pairs(banned) do if p:IsA(b) then p:Destroy() end end end end