I am trying to slide a part using TweenService. The line of code that I am having trouble with is this: local Goals = {Position = Vector3.new(-2113.106, 61.693, 2941.344)} and I came up with this error: attempt to call global 'Vector3'(a table value). Are you not allowed to use Vector3.new when it comes to positions and TweenService? I would appreciate if you could help me with my struggles.
Here is a script that I used to make 4 parts slide upwards smoothly:
local door1 = game.Workspace.door1 local door2 = game.Workspace.door2 local door1_1 = door1:WaitForChild('door1') local door1_2 = door1:WaitForChild('door2') local door2_1 = door2:WaitForChild('door1') local door2_2 = door2:WaitForChild('door2') for i = 1, 20 do door1_1.CFrame = CFrame.new(door1_1.Position + Vector3.new(0, 0.5, 0)) door1_2.CFrame = CFrame.new(door1_2.Position + Vector3.new(0, 0.5, 0)) door2_1.CFrame = CFrame.new(door2_1.Position + Vector3.new(0, 0.5, 0)) door2_2.CFrame = CFrame.new(door2_2.Position + Vector3.new(0, 0.5, 0)) wait() end
I don't think you can use Tweening
for parts. Also, I don't think a Vector3
value is allowed in a table
, just like the error says.