Output saying need a table function but cant add one

I am kind of new with tweens and math and so basically at this part of my script


the output keeps saying I need to add a table but I’m not sure on how I’m supposed to add it as I’ve tried replacing some of the () with {} but it keeps showing the same message of try to add a table value. Does anyone know how I can add the table? or is it fine and the output is bugged?

It seems like to are referring to the goal table.
Try entering this into the function:

{Position = Vector3.new(math.random(10,20)/10,math.random(10,20)/10,math.random(10,20)/10)}

Basically, you have to declare what properties you’d like to tween and to what value.

In addition, you seem to have forgotten .new to construct the Vector3.

1 Like

You need to do Vector3.new for example:

An extremely compact version

TweenService:Create(part, TweenInfo.new(), {Position = Vector3.new(math.random(10,20)/10,math.random(10,20)/10,math.random(10,20)/10)}):Play()

Yeah i didn’t realize i needed .new for the vector, i thought that you only used that with the tweens, thank you to anyone who responded :slight_smile: