I'm trying to get the tween of the camera for my game to work right but when trying to play the tween itself i get error (Unable to cast to Dictionary) Here's the code that seems to be causing the error but i don't know.

TweenService:Create(camera, tweenInfo, {CFrame = CFrame.new(petClone.PrimaryPart.Position + (petClone.PrimaryPart.CFrame.lookVector * 5) + Vector3.new(0,0.75,0)),petClone.PrimaryPart.Position})

(camera and tweeninfo have been already defined)

3 comments

0

Why do you have (petClone.PrimaryPart.CFrame.lookVector * 5) in parenthesis? Idk maybe something to do with the amount of parenthesis and the need for correct use.

0

Changing the amount of parenthesis worked!

0

Oh ok. Nice.