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

Can you make a bodymover only affect one axis? [Solved]

Asked by
H3kken -4
5 years ago
Edited 5 years ago

I tried making a bodyposition affect only the Y axis. I tried making it nil, I tried to put "..." in the other axes but it didn't work. Anyone knows how I can do this?

script: V - Parent here is a bodyposition. (the script is inside the bodyposition)

script.Parent.Position = Vector3.new(nil,19.209,nil)

0
With your vector3 use for the x and z number `script.Parent.Position.X` and `script.Parent.Position.Z` That should work Protogen_Dev 268 — 5y
0
use `script.Parent.Position = Vector3.new(0,19.209,0)` this will only apply force to the y axis and no the z or x axis Gameplayer365247v2 1055 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Modify BodyPosition.MaxForce to have 0 in the axes you do not want it to affect. ex:

script.Parent.MaxForce = Vector3.new(0, script.Parent.MaxForce.Y, 0)

0
Thanks! H3kken -4 — 5y
Ad

Answer this question