Beam.LocalTransparencyModifier (or ParticleEmitter/Trail)

As a Roblox developer, it is currently too hard to zoom in a character to first person as a custom rig containing beams. (or ParticleEmitters/Trails).

One of my games have wolves with bat wings,


Which use a beam effect.

When zooming in though, you get that the bat wings can’t become transparent in 1st person, blocking the user’s camera.

https://gyazo.com/efaa651a63fafadcec0be980a711f4d7.mp4

As you have in the Roblox CoreScripts, TransparencyController,

Only BaseParts and Decals are supported, as they have the LocalTransparencyModifier property.
Adding LocalTransparencyModifier to Beam (or ParticleEmitters/Trails) and pushing the CoreScripts module to include support for these instances will allow for a seamless 1st person experience.

7 Likes

For the time being, you can modify the TransparencyController to create a pseudo LocalTransparencyModifier for constraint paths. LocalTransparencyModifier is a multiplier so you should be able to achieve relatively the same effect by setting the transparency on the client.

Steps:

  1. Access the Transparency NumberSequence of any constraint path. Cache this value as the original transparency.
  2. Create a new NumberSequence that uses all the old values and multiplies them by the number that is eventually used as the LocalTransparencyModifier for BaseParts or Decals.
  3. Apply this new NumberSequence as the Transparency for the constraint path alongside any LocalTransparencyModifier statements.

I find this to be a useful workaround you can toy with while such a property doesn’t exist.

1 Like