Cannot subtract from NumberSequence

I’m using for loops for this.
I’m currently trying to make a more efficient way of fading transparency without TweenService.

Unfortunately I stumbed across this error:

This is the problematic line:

This error only pops up when I add - behind =

Here’s the for loop part of the script that is not functioning, everything else is fine.

Any way I can fix this…?

I suggest looking at the evalNS function:

for i = 1, 0, -0.25 do
    Lens.Transparency = i
    light.Transparency =, 1)
    spotLight.Brightness += 2.5


local currentValue = light.Transparency.Keypoints[1].Value
light.Transparency = - 0.25, 1)

also make sure to benchmark because tweenservice is already efficient so you might not be saving any performance by doing this

Running TweenService on server is not a good thing to do as far as I know…

Let me try the code first although.

Running the tween service on the server side


Setting a instance property many times on the server side

Have the same negative effect of having to send the instant properties over the network to all the clients multiple times

Running TweenService on the server is all fine. :slight_smile:

That is not to say, that you should overdo them.


I would suggest that you keep doing tweens. But if you insist on sticking to your work-around method, then I would suggest this for the beam:

Fixture.Head.Beam.Light.Transparency =*5)-(.25*i),1) -- I tried to adapt the method to your for-loop, which right now loops through 5 times.