LocalTransparencyModifier equations incorrect

Was using this page as a resource for my own transparency modifier function and the explanation equation appears to written incorrectly.

local clientTransparency = part.Transparency + (1 * part.localTransparencyModifier)

5 Likes

The page: https://developer.roblox.com/en-us/api-reference/property/BasePart/LocalTransparencyModifier

The correct formula:

realTransparency = 1 - (1 - part.Transparency)*(1 - part.LocalTransparencyModifier)

source: Camera does not account for .LocalTransparencyModifier

3 Likes

This is still a problem over two years later. The equation is still incorrect in the old documentation site, and the new documentation site has no section for this property at all.

The correct equation (sircfenners approach also works but is slightly more complicated)

realTransparency = Transparency + (1-Transparency) * LocalTransparencyModifier