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

Can anyone answer this question?

Asked by
Hakupa 0
10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Can anyone tell me what BodyMover object is optimal for a train that runs on turns and loops? I have been stuck with this all day. On the ROBLOX forums, I have confirmed that my script is correct and the turns in my track are not too sharp, and I have widened the track. I've been told to use BodyThrust instead of BodyVelocity, but the same problem happens. I've also tried BodyForce, but to no avail.

Here is the problem:

My train contains a button, with a script in it that has 3 functions defined, called in this sequence: normalspeed() lowspeed() brake()

normalspeed() sets BodyThrust.force to (0,0,-125000), moving the train forward along the track, which is aligned with the z axis. It moves fine while on the track, until it hits a quarter-loop turn, in which the track gradually lines up onto the x axis:

http://s22.postimg.org/dlwghrv9s/Roblox_Screen_Shot08072014_140614296.jpg

It only works when I keep the train on normalspeed() the whole time, since BodyThrust.Parent still has enough force to keep moving the train, but when I call the brake() function to stop the train after the turn, that call normalspeed() again, the train won't budge. Does anyone know what BodyMover will solve this problem? Thanks in advance.

0
Your questions would be much easier to read if you would please use the code. Just click the blue Lua button and put the stuff inside. wjs3456 90 — 10y

Answer this question