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

How do I accelerate a movement with Vector3? Am I a VERY beginner

Asked by 3 years ago

Uh hello, as you say in the title of my question, I'm a beginner. I'm doing an Obby and I'm literally a very beginner, what I meant by that was? Well, I want to know how I control the speed of a part's movement with vector3. If it is not possible please explain to me another way, I just wanted to move the part :(

0
Google translate? LeedleLeeRocket 1257 — 3y

2 answers

Log in to vote
0
Answered by
Oxprem 140
3 years ago

Moving Parts with Vector3 isn't too difficult. Try inserting this into a server script inside the part you want to move:

while true do
    wait(1)
    repeat
        script.Parent.Position = Vector3.new(script.Parent.Position.X + 1, script.Parent.Position.Y, script.Parent.Position.Z) -- moves the part in the X axis
    until script.Parent.Position.X > 50 -- 50 is the goal that the X axis must reach
    wait(1)
end

I didn't test this out yet, so I'm not sure it will work.

0
Use TweenService. You also need to break your loop:P Ziffixture 6913 — 3y
Ad
Log in to vote
0
Answered by
tomekcz 174
3 years ago

Hello! parts have a velocity property that define how fast theyre go While Moving parts and TweenService dont replicate physics

Answer this question