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

How could I move a part any way i wanted to with a script? [closed]

Asked by 6 years ago

Ive tried body gyros and body position, ive also tried adding a humanoid to the part and using MoveTo()

Closed as Not Constructive by Goulstem

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

In a Part, there is a property called Position that can be modified with Vector3 which uses X, Y, and Z coordinates.

Example:

script.Parent.Position = script.Parent.Position + Vector3.new(0,0,0.1) --This moves the part 1/10th of a stud on the Z coordinate

You can read up more on Vector3 and the Position property here: http://wiki.roblox.com/index.php?title=API:Class/BasePart/Position http://wiki.roblox.com/index.php?title=API:Vector3

0
It will not always do that.... hiimgoodpack 2009 — 6y
0
@BennyBoi i want it to move to a position not just on a coordinate. Jayferg14 -5 — 6y
Ad
Log in to vote
0
Answered by
H4X0MSYT 536 Moderation Voter
6 years ago

If you want it to move to a position, you can try tween it. Or run a loop to every 0.1 seconds move it 0.1 studs or so to make it seem smooth.