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

Help with decals? Decal not appearing when script executed/Wont show up.

Henlo freinds, I cant figure out why this wont make a decal, any help is appreciated!

local PreviousDecal = game.Workspace.EmptyThing:FindFirstChild("Decal")
if PreviousDecal then PreviousDecal:Destroy() end -- So theres only 1

local MyaD = Instance.new("Decal")
MyaD.Parent = game.Workspace.EmptyThing
MyaD.Texture = 617687888
game.Workspace.EmptyThing.Transparency = 0
MyaD.Face = "Front"

game.Players.PlayerAdded:connect(function(p)
    if p.UserId == 17408797 or p.UserId ==4134651 then
    local Mya = game.Workspace.EmptyThing:FindFirstChild("Decal")
    MyaD.Texture = 31490184
    end
end)


game.Players.PlayerRemoving:connect(function()
    for _, p in pairs(game.Players:GetChildren()) do
        if p.UserId == 17408797 or p.UserId ==4134651 then
            return true
        end
    end
    local Mya = game.Workspace.EmptyThing:FindFirstChild("Decal")
    MyaD.Texture = 617687888
end)

1 answer

✓ Accepted answer

use this as the links

rbxassetid://31490183

your fixed script below

local PreviousDecal = game.Workspace.EmptyThing:FindFirstChild("Decal")
if PreviousDecal then PreviousDecal:Destroy() end -- So theres only 1

local MyaD = Instance.new("Decal")
MyaD.Parent = game.Workspace.EmptyThing
MyaD.Texture = "rbxassetid://617687888"
game.Workspace.EmptyThing.Transparency = 0
MyaD.Face = "Front"

game.Players.PlayerAdded:connect(function(p)
    if p.UserId == 17408797 or p.UserId ==4134651 then
    local Mya = game.Workspace.EmptyThing:FindFirstChild("Decal")
    MyaD.Texture = "rbxassetid://31490184"
    end
end)


game.Players.PlayerRemoving:connect(function()
    for _, p in pairs(game.Players:GetChildren()) do
        if p.UserId == 17408797 or p.UserId ==4134651 then
            return true
        end
    end
    local Mya = game.Workspace.EmptyThing:FindFirstChild("Decal")
    MyaD.Texture = "rbxassetid://617687888"
end)

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