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

Vector3 wont let me move object down?

Asked by
CIG0 -5
5 years ago

clonekockairon.Position = clonekockairon.Position + Vector3.new(0, -6, 0)

i can move objects in all directions but DOWN, am i doing something wrong?

Please help

Ty!

1 answer

Log in to vote
0
Answered by
Audiimo 105
5 years ago

It is possible that this is happening cause its colliding with another object. In this case you'll want to use CFrame. It is quite simple to understand and use! So let's dive right in. First all you're gonna need to do is change position with CFrame like so:

clonekockairon.CFrame = CFrame.new(clonekockairon.Positon) * CFrame.new(Vector3.new(0, -6, 0))

So what we did was we took the parts CFrame (which uses a Vector3 value) and multiplied it by a another CFrame value (the desired position you want it to move). The reason we use the parts position and multiply by the desired direction is cause if we didn't the part would just teleport to the position and not downwards from its current. CFrames cannot be added, subtracted, or divided. You can only multiply. If you want it to go in a backwards direction you multiply by a negative number and so on.

0
ty so much i will try that ! CIG0 -5 — 5y
Ad

Answer this question