Having trouble setting values for a tween service

local trail = script.Parent.Trail

trail.Attachment0 = script.Parent.Attachment0

trail.Attachment1 = script.Parent.Parent[“Trail Display2”].Attachment1

local TweenService = game:GetService(“TweenService”)

local part = script.Parent

local part2 = script.Parent.Parent[“Trail Display2”]

local goal =

local goal2 =

goal.Position = part.Position * Vector3(0,3,0)

goal2.Position = part2.Position * Vector3(0,3,0)

local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.In, -1, true)

local tween = TweenService:Create(part, tweenInfo, goal)

local tween2 = TweenService:Create(part2, tweenInfo, goal)



in the above code, I am trying to set a tween service but whenever I set the end goal for the tween my output returns with an error stating an attempt to call a table value. I don’t see why that is wrong since that’s exactly what I’m doing here.

I apologize ahead of time where the goal values are there should be {} brackets

Your goal values should be like this:

local goal = {Position = part.Position * Vector3(0,3,0)}

then you can do:

TweenService:Create(Instance, TweenInfo.new(), goal)

You forgot to add .new() on your Vector3 lines. You have just Vector3()


Vector3(0,3,0) should be Vector3.new(0,3,0) and should be added, not multiplied, so

goal.Position = part.Position + Vector3.new(0,3,0)

goal2.Position = part2.Position + Vector3.new(0,3,0)

ANd in your Tween2, not sure if intentional, but shouldn’t it use goal2 instead of goal?


this helps simplify my script but @jmt99 was correct, thanks to you both

Yeah I fixed that while I was waiting on an answer bc I noticed both things were wrong, thanks friend!

1 Like