Previously, i asked how to removes shirts/pants. I got that down, and it's working. However, it's not working for packages (CharacterMesh) or Hats.
It's a bug, where when all players are in the lobby. Everyone is clothless, with the right bodycolors i choose for lobby waiting.
However, if someone is wearing a package. It stays on. How would i remove a package, and hat from players. If they have one on?
-Thanks in advance!
local gt = game.Players:GetPlayers() for I,v in pairs(gt.Character:GetChildren()) do if v:IsA("CharacterMesh") then v:Destroy() end end
ther you go
I am guessing....
function Respawn(newPlayer)
wait(0.5) print("Respawned") p = newPlayer.Character:GetChildren() for i = 1, #p do if p[i].className == "CharacterMesh" then print("Found") p[i]:remove() local m = Instance.new("Message") m.Parent = newPlayer m.Text = "Character Bodies aren't aloud in this game." game:GetService("Debris"):AddItem(m,4) end end end function Enter(newPlayer)
newPlayer.Changed:connect(function (property) if (property == "Character") then Respawn(newPlayer) end end) end game.Players.ChildAdded:connect(Enter)