Possible to tween materials of a part?

I’m trying to make a streetlight that fades its glow when at day and increase glow of the part at night and using Pointlights do not simulate that “glowness” of the part and trying to tween the material from plastic to neon will output and error and says “error token”
any help?

Also using GetminutesAfterMidnight in a while loop will continously repeat the tween itself resulting in the part blinking so what are the solutions?

1 Like

Unfortunately, directly tweening materials is not possible.

You could do some fancy tweens to make the part very small, then come back out a new material, but it won’t work from material to material directly.

3 Likes

If you want to make material change you should use Enum.Materials

1 Like

You could have two parts, and put them in the exact same position. One is neon, one is plastic. When you want to tween to plastic from neon, you could tween the neon part’s transparency to 1, and at the exact same time, tween the plastic part’s transparency to 0. Make sure to use the exact same TweenInfo. Do the opposite for when you want to tween back to neon.

6 Likes

sorry if this slides offtopic but now how do i not make the tween blinking inside the while loop resulting it blinking back and forth?

using an if statement Clocktime does not update clocktime so i have to rely on while loop getminutesaftermidnight?

1 Like

The glow produced by Neon decreases as you change the parts color. Could you tween the color to black? If you want to keep the color identical, maybe add a plastic part which you tween the transparency of as you tween the neon out.

3 Likes