Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

2 answers

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

2 comments

0

It will not always do that....

0

@BennyBoi i want it to move to a position not just on a coordinate.

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.