How to add a Decal Onto Every Side of a Part Using Console?

How do I add a decal onto every single part in workspace on all sides? I never found this anywhere so please help me, thanks :DDD

(I have about 10,000 Parts, so put this in console please!)

10k parts is quite a lot, but surely the quickest way must be to loop through every part and then add a decal?

local decalTexture = ""

for i,part in ipairs(workspace:GetChildren()) do
	for i2,face in ipairs(Enum.NormalId:GetEnumItems()) do
		local decal = Instance.new("Decal")
		decal.Parent = part
		decal.Face = face
		decal.Texture = decalTexture
	end
end


Looks pretty good, just 2 things to add. Check and make sure it’s a part, and use GetDescendants so you get parts inside of folders and/or models:

local decalTexture = ""

for i,part in ipairs(workspace:GetDescendants()) do
    if not part:IsA("BasePart") then continue end)
	for i2,face in ipairs(Enum.NormalId:GetEnumItems()) do
		local decal = Instance.new("Decal")
		decal.Parent = part
		decal.Face = face
		decal.Texture = decalTexture
	end
end
2 Likes

Oh yeah sorry I don’t know what I was thinking, 100%

1 Like

how do I input the decal texture with the id? the id im trying to put in is 5175031737

I don’t know much about decals, I’m fairly new to them.

Change the TextureId variable to the texture.

To:
local decalTexture = 5175031737

Also if that doesn’t work try:

local decalTexture = "rbxassetid://5175031737"

If you don’t want it to paint over players you can do this:

(I used the sshf texture as an example, you can just replace it with the image id)

local decalTexture = "http://www.roblox.com/asset/?id=8821058019"

for i,part in ipairs(workspace:GetDescendants()) do
	if part:IsA("BasePart") and not part:FindFirstAncestorWhichIsA("Model"):FindFirstChildWhichIsA("Humanoid") then
		for i2,face in ipairs(Enum.NormalId:GetEnumItems()) do
			local decal = Instance.new("Decal")
			decal.Parent = part
			decal.Face = face
			decal.Texture = decalTexture
		end
	end
end