I want the script to add/tween a objects postion by adding it.
But, the code i made isnt working.
Code -
local tween = game:GetService("TweenService")
local goal = {}
goal.Position = goal.Position + Vector3.new(12,12,12)- -the bit the error genorates.+
local tweenifo = TweenInfo.new(
2, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
true, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local tw = tween:Create(script.Parent,tweenifo,goal)
tw:Play()
local tween = game:GetService("TweenService")
local goal = {}
goal.Position = script.Parent.Position + Vector3.new(12,12,12)- -the bit the error genorates.+
local tweenifo = TweenInfo.new(
2, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
true, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local tw = tween:Create(script.Parent,tweenifo,goal.Position)
tw:Play()
local tween = game:GetService("TweenService")
local tweenifo = TweenInfo.new(
2, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
true, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local tw = tween:Create(script.Parent,tweenifo, {script.Parent.Position + Vector3.new(12,12,12)})
tw:Play()