Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why doesn't my script work? (Decal image pasted on every surface of a part in workspace.)

So I'm making a little joke map for a friend of mine. The script I've created is supposed to find any baseparts, which in return pastes a decal on every surface of said parts.

However, the script being enabled, doesn't do anything nor gives me any error in the output. What is going on?

for _, v in pairs(workspace:GetDescendants()) do
    if v:IsA("BasePart") or v:IsA("UnionOperation") then
        do
        for i = 0, 5 do
            local decal = Instance.new("Decal")
            decal.Texture = "rbxassetid://6255641236"
            decal.Face = i
            decal.Parent = v
           end
        end
    end
end

1 comment

0

maybe you have to do :WaitForChild()

1 answer

Your decal texture was improper. Here is an updated script with your decal image you wanted to appear.

for _, v in pairs(workspace:GetDescendants()) do
	if v:IsA("BasePart") or v:IsA("UnionOperation") then
		do
			for i = 0, 5 do
				local decal = Instance.new("Decal")
				decal.Texture = "http://www.roblox.com/asset/?id=6255641229"
				decal.Face = i
				decal.Parent = v
			end
		end
	end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.