Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to move a part from position to another position?

Asked by 3 years ago
Edited 3 years ago

I think move a part like the part is on position -134 -233 -122 and I wanna move it to -222 -548 -876 I tried workspace.example.Position = -222 -548 -876 it have blue line and it doesn't work.

0
You need to do; workspace.example.Position = Vector3.new(-222, -548, -876); because Position is a Vector3 value so you need to construct it using the Vector3 constructor. imKirda 4491 — 3y
0
Use Vector.new() nkminion 21 — 3y

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago

Hey there! This is my first answer in this month.

So this question is simple. You cannot set the position by doing workspace.example.Position = -222 -548 -876 , what you need to do is:

workspace.example.Position = Vector3.new(-222, -548, -876)

Notes:

There is no quotation marks (") between the bracket.

You need to put comma (,) between x,y,z positions. Example (1, 2, 3) [It is okay to put spaces or no spaces. If you wanna make it look clean, do my way. But the most important thing is you must put comma between them.]

Lastly, imKirda did a very well explaination of what you should do. I'm just giving of what you should put in your script. Thanks for questioning and have a happy day!

If you have any problems, comment below and I will be glad to help. Cya!

0
Please mark my comment as the answer so everyone knows this is the correct way. Thanks for reading! Xapelize 2658 — 3y
Ad

Answer this question