How do I do Vector3 Positions? How do I use vector3 anywhere? (2 Part question)

Part 1*
Like, I have a model of a square frame (hollow on the inside) so like a frame. And I want to move the vector3 position with tweening. But I can only do vector3 for one position of the part. So how do I move the whole model? (Setting a primary part will not work. I tried it)

Part 2
Lets say I did Vector3(1,1,1) but now I want to move my model to (2,1,3). Is there a way where I can just automatically tell it where it is instead of having to go back and change everything.

Is everything welded to the primary part?

I don’t think I understand what you mean? You can create a function that sets the position, but that won’t really help that much

local function SetPosition(x, vector)
    x.Position = vector;
end;

2 Likes

Instead of using tween to move the model I would use a BodyPosition.

Also if you don’t need tweening for whatever your doing, you can try the MoveTo()

Model:MoveTo(Vector3.new(2,1,3))
2 Likes

Alright… For the first question, the answer is pretty simple… If the model is already made(As in not being made in a script) a easy way to weld it is to use a plug in. I personally like this plug-in made by @PlaceRebuilder. Basically you just select all of the parts of the model and click on the plug-in and it’ll weld it all together…

If its a frame, I’d recommend doing an invisible part in the middle that is welded to everything else to act as a primarypart. Then you can just do your tweenng , :MoveTo, or :SetPrimaryPartCFrame on the model to move it. I’ve done this method a ton, never had a problem with it…

For the second question, didn’t quite understand what you mean’t. Mind elaborating?

2 Likes

Sure thing. Lets say I have a complete model at point A (Complete model means I have scripted all the vector3positions. & now I would like to move the whole model to Point B. Now, this would obviously break the function because the values of the Vector 3 will still be at point A.

So, is there an easier way of doing this? Instead of having to take all the new positions and replace them again

If Im understanding it right, the previous method should work for that, just weld it all up and if you move the primary part, the entire model will move.

No, I mean like its position in the world. Lets say I want to move Object A to Point B. Now, I change my mind and I move object A to point C. But it will still go back to Point B, because the coordinates are set to point B. So I have to manually set them to Point C’s new coordinates

Still don’t quite understand, if I am, then yea you just have to go in and set the value,you can just take a varaible for each location if you want to.

local PointA = Vector3.new(1,341,13)
etc

Ah, its alright then. Thank you, But I would need further clarification on the timer.

1 Like