Problem with deleting CharacterMesh

  1. What do you want to achieve?
    I want to make a blocky body, not just R6

  2. What is the issue?
    CharacterMesh doesnt delete and i didn’t find information that helped me

  3. What solutions have you tried so far?
    I’v tried using ‘for’
    cycle, and it checked character with ‘if character then’ also i tried using humanoid description

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		for i,CM in pairs(char:GetDescendants()) do
			if CM:IsA('CharacterMesh') then
				CM:Destroy()
			end
		end
	end)
end)

wait 1 heartbeat or task.wait() for it to load
Instead you can use CharacterAppearanceLoaded if you dont like hacky implementation

Cause why it didnt work:

It simply loads after a little delay so you run a loop BEFORE it even gets created

Note for future:

Avoid using ipairs and pairs as since its not relevant in Luau (language roblox uses to run scripts)

Thanks for the help, it worked! :grin: But if it’s not too much trouble, can you tell me what can replace pairs and ipairs? Anyways thanks

you can just not write them at all

local tab = {1,2,3,4,5}

for i,v in tab do
print(v)
end


Can you flag my post as a solution plz :pray: plz can i win?