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

How to stop local character transparency modifier?

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

I can confirm the script works as intended.

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

2 comments

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.

0

OH. I'm an idiot. Decals have the LocalTransparencyModifier property too, I believe, so you can just set to that too.

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