It says it cannot cast to dictionary because the Create method expects a dictionary as the third parameter. You cannot tween number values, you must tween an instance. The third parameter would hold the new properties of the instance in a dictionary, even if it is one value. If you want to tween a number, use a floatValue and adjust the value
https://developer.roblox.com/en-us/api-reference/function/TweenService/Create
02 | local Tween = game:GetService( "Tween" ); |
04 | local num = Instance.new( "FloatValue" ); |
06 | num.Parent = game.Workspace; |
08 | local info = TweenInfo.new( |
10 | Enum.EasingStyle.Linear, |
11 | Enum.EasingDirection.InOut, |
21 | Tween:Create(num, info, goal):Play(); |