Can't Tween Variable to ease in value

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.

So take make it go from 0 to 11 linearly.

Only this one part of the script isn’t working, everything else in the script is irrelevant to the issue.
Any help would be amazing!

local blurLevel = 0
blurLevel = blur.Size

part:Destroy()

local toTween = blur.Size
local tweenInfo = TweenInfo.new(1, "Linear", "Out")
local goal = {}
goal.Size = 11
local tween = game:GetService("TweenService"):Create(blur, tweenInfo, goal)

tween.Completed:Connect(function()
	blur.Size = 0
	tween:Play()
end)

tween:Play()

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()

I would recommend using a for I loop like this:

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 :sweat_smile:

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().