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

How to stop local character transparency modifier?

Asked by 9 years ago

EDIT: I am able to get rid of the character transparency modifier, but I am unable to stop my decal morph changing transparency, no matter what I do. Any help would be appreciated.

Hi everyone. The "new" local character transparency feature is causing some decals in my character to turn invisible to other players when the characters starts changing transparency and I was wondering how I could turn this off or override it.

I've looked at the wiki page on the LocalTransparencyModifier property and I was wondering if something like this could remove the character transparency feature on all parts:

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()

function setModifier(parent) --Recursive function
    for i,v in pairs(parent:GetChildren()) do
        if v:IsA("BasePart") then
            v.LocalTransparencyModifier = 0
        else
            setModifier(v)
        end
    end
end

game:GetService("RunService").RenderStepped:connect(function() --The game engine overrides the change of the LocalTransparencyModifier, so we have to use RenderStepped to set it for each frame.
    setModifier(character)
end)

Any help is appreciated, thanks.

1 answer

Log in to vote
-2
Answered by 9 years ago

I can confirm the script works as intended.

The effect is kind of funny in first person; I suggest you try it.

0
Yeah, I noticed that. It's just that now the decal always starts becoming transparent when you zoom in and I'm unable to stop it. Spongocardo 1991 — 9y
0
OH. I'm an idiot. Decals have the LocalTransparencyModifier property too, I believe, so you can just set to that too. iconmaster 301 — 9y
Ad

Answer this question