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

Decals in character not responding to change in transparency?

Asked by 9 years ago

Hey everyone, I'm trying to change the Transparency property of some decals in my character but they don't seem to respond to the change in the transparency property. I've had this issue with other things several times but have got around it but I don't know how to get around this.

My function (all variables are accounted for):

function transparent(value)
    if player.Character:FindFirstChild("Chest") == nil then return end
    for i,v in pairs(player.Character.Chest.Middle:GetChildren()) do
        if v:IsA("Decal") then
            repeat v.Transparency = value until v.Transparency == value
        end
    end
end

How do I get decals in the character to respond to the change in the transparency property?

Any help is appreciated, thanks!

1 answer

Log in to vote
0
Answered by 9 years ago

Decals have a Transparency value of their own. In your script, be sure to access the decal's Transparency rather than a the transparency of the object they are embedded on.

Ad

Answer this question