Yo, so this code doesn’t work
local Book = script.Parent local TS = game:GetService("TweenService") local TI = TweenInfo.new(4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,-1,true) local goal = {} goal.Position = Book.Position.Y + 3 -- the problem is here local tween = TS:Create(Book,TI,goal) tween:Play()
But this one does
local Book = script.Parent local TS = game:GetService("TweenService") local TI = TweenInfo.new(4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,-1,true, 0) local goal = {} goal.Position = Vector3.new(Book.Position.X, Book.Position.Y + 4, Book.Position.Z) local tween = TS:Create(Book,TI,goal) tween:Play()
So why didn’t Book.Position.Y work even though its dealing with vector3? Thanks.