Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 7 years ago
Edited 7 years ago

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

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

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)

Ad

Answer this question