Ad
Log in to vote
0

Texture not showing when using Instance.new('Decal')?

Asked by 9 months ago

Im making a spam decal thingy in Studio, however the decals don't show anything.

Here is the code i wrote (Not the best, but its how i roll):

local decals

local success, eMes = pcall(function()
    for i, part in pairs(workspace:GetChildren()) do
        if part.ClassName == 'Part' or part.ClassName == 'UnionOperation' then
            decals = {
                        Instance.new('Decal', part),
                        Instance.new('Decal', part),
                        Instance.new('Decal', part),
                        Instance.new('Decal', part),
                        Instance.new('Decal', part),
                        Instance.new('Decal', part)
                    }

            for i, decal in pairs(decals) do decal.Texture = 'http://www.roblox.com/asset/?id='..split[3] end

            decals[1].Face = Enum.NormalId.Top
            decals[2].Face = Enum.NormalId.Bottom
            decals[3].Face = Enum.NormalId.Front
            decals[4].Face = Enum.NormalId.Right
            decals[5].Face = Enum.NormalId.Back
            decals[6].Face = Enum.NormalId.Left

        end
    end
end)

if success then
    print('Admin command successfully initiated!')              
else
    return eMes
end

Context: split[3] is the id of the texture.

Nothing is being shown. Plz help me, i don't know what could be going on.

1
Is split defined elsewhere in the original code? uhi_o 417 — 9mo
0
split is the message a players says when they chat (chatted event), divided into a table via the :split() function of a string. deeskaalstickman649 388 — 9mo

Answer this question