So, I have a Blur Effect inside of lighting set to a default value of the size is 0,
I want to make that value increase until it hits a certain number.
toTween is defined as blur.Size, meaning TweenService would be trying to tween the Size property of a number, which does not exist.
Try replacing local toTween = blur.Size with local toTween = blur
Additionally, you only need to play the tween once. You can replace the repeat until loop with tween.Completed:Wait()
Local blur = game.Lighting.Blur
blur.Size = 0
For i = 0, 11, 1 do —(StartPoint,Endpoint,Interval)
blur.Size = i
wait(1) —to wait 1 sec before going again
End
—Other code(everything after the loop above will not run until loop is finished)
Disclaimer: I am on mobile so you might get some syntax errors
Your issue is that you are using it in a repeat loop - this is calling Tween:Play() every time your loop runs which will cancel the tween playing before. Use the Tween.Completed event. If you would like to yield until your tween is complete you can use Tween.Completed:Wait() which will yield until the Tween has completed. If you do not want your code to yield but you want to do something when your tween completes you can use Tween.Completed:Connect().