The script I have written isn't functioning as needed. When I run the game an error appears in line 6 saying unable to cast dictionary error.
anf = script.Parent.ViewportFrame.Folder Goals = {} Goals.CFrame = CFrame.new(-1017.90277, 1.26408625, -1022.59729) info = TweenInfo.new(0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0) tween = TS:Create(anf.Top, Goalsl, info) tween:Play()
TweenInfo
must be the second parameter of TweenService:Create
and property table third, you also made a typo, "Goalsl" should be "Goals":
local tween = TS:Create(anf.Top, info, Goals)
It's good to put local
before variables to localize them and improve performance.
Well, its a simple typo you made.
On line six, 2nd parameter of TS:Create(), you used Goals1, instead of Goals[1]