This is in ServerScriptService, I am trying to make it take of all meshes (turn into normal mesh)
--Removes Character Meshes game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) local Children=char:GetChildren() repeat wait() local Found=false for _,Child in pairs(Children) do if Child:IsA("CharacterMesh") then Child:Destroy() Found=true end end until Found==true end) end)
I'm not exactly seeing a problem with your script, it should be looping through all the objects in the character. The only thing I would suggest is you using the ChildAdded
event on the character model. For one thing, it's cleaner, and another, it will detect any objects entering the character model.
game.Players.PlayerAdded:connect(function(Player) --Player Enters, connect to them. Player.CharacterAdded:connect(function(Character) --That Player has a new Character, connect to it. Character.ChildAdded:connect(function(Object) --There is something new added to the Character, the script will need to check it out. if Object:IsA('CharacterMesh') then --The new object is a CharacterMesh, the script should do something to it. Object:Destroy() --Destroy it, it will get deleted. print('Found and Deleted Character Mesh.') end end) end) end)