b1tmap
|
  |
| Joined: 03 Jan 2011 |
| Total Posts: 425 |
|
|
| 19 Oct 2015 10:10 PM |
while true do main.BodyVelocity.velocity = main.CFrame.lookVector * speed wait() end
All I'm doing is moving a part forward based on its lookVector, in a server based on FE. No RemoteEvents or RemoteFunctions are being fired. No idea why, but this specific part of code basically wreaks havoc on the physics. However, I tested out some free models that use the same method, and they work fine. Why?
By "crashing" I mean the part ("main") just spazzes out in one place, teleports to somewhere, then teleports back.
|
|
|
| Report Abuse |
|
|
b1tmap
|
  |
| Joined: 03 Jan 2011 |
| Total Posts: 425 |
|
| |
|
FlyNormal
|
  |
| Joined: 30 Sep 2015 |
| Total Posts: 344 |
|
|
| 19 Oct 2015 10:20 PM |
I believe you don't need to use while loop for BodyVelocity.
Just set it once and it will move accordingly without stopping. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2015 10:22 PM |
1. are you sure that line is what's causing that behavior?
2. sanity check 'speed'
3. I reproduced this setup and it works fine for me so it's probably something else causing it. |
|
|
| Report Abuse |
|
|
b1tmap
|
  |
| Joined: 03 Jan 2011 |
| Total Posts: 425 |
|
|
| 19 Oct 2015 10:23 PM |
| A while loop is one of the ways to update it, but setting it once doesn't work. It would just fly along the initial lookVector. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2015 10:23 PM |
"Just set it once and it will move accordingly without stopping."
A possibility is that he might want it to constantly move forward its look vector, even if it changes orientation.
a while loop is not the best solution for this though you're right. |
|
|
| Report Abuse |
|
|
b1tmap
|
  |
| Joined: 03 Jan 2011 |
| Total Posts: 425 |
|
|
| 19 Oct 2015 10:27 PM |
Well, thank you at least for testing that stuff out for me. I was too lazy :p
Now I just have to sift through 5 long scripts to see wtf causes this
funfun |
|
|
| Report Abuse |
|
|
b1tmap
|
  |
| Joined: 03 Jan 2011 |
| Total Posts: 425 |
|
|
| 19 Oct 2015 10:36 PM |
| Actually, yeah, I think it's that line. If I comment it out, sure, the ship doesn't move anywhere, but the lag isn't present either. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2015 10:39 PM |
Well it's probably a combination of that line+something else, cuz when I just have those lines it works as expected for me.
It's hard to tell what it might be without knowing what else is going on but good luck! |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2015 10:45 PM |
while wait() do main.BodyVelocity.velocity = main.CFrame.lookVector * speed end
put it in its own script and experiment with the other BodyVelocity properties |
|
|
| Report Abuse |
|
|