Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 07:42 AM |
I tried this but my player isn't moving
bf = Instance.new("BodyForce") bf.Force = Vector3.new(0,math.huge,0) bf.Parent = game.Workspace.Player.Torso |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
| |
|
| |
|
deedeedum
|
  |
| Joined: 15 Jan 2007 |
| Total Posts: 19 |
|
| |
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 08:37 AM |
| I just want my player to move backwards when pressing a button? |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 08:38 AM |
| Well then you are using the wrong axis and maybe BodyMover. You might want a BodyThrust so they can move backwards. Otherwise, you are currently trying to move them upwards. |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 08:43 AM |
| I fixed the axis, changed to BodyThrust but it isn't working. |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 08:47 AM |
Try putting it in HumanoidRootPart? Idk if it will work, but HumanoidRootPart is the new physics root thing. |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 08:55 AM |
| Well the bodyforce is working but everything below 17000 won't make the play move, and everything above 17000 will make the player fall off the map because of the huge amount of pressure apparently? roblox is broken???? |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 26 May 2015 08:57 AM |
I had a problem with applying forces to objects that players were welded to. It seemed that more force than usual was required to make the object move. The solution was to set character.Humanoid.Sit = true. Also, to get the actual value for acceleration you want to use, take the player's mass into account (sum up :GetMass() the parts in the player, then force = mass * acceleration). |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 09:05 AM |
| How to get the mass of all parts in one or do I need to get all the masses of each part individually? |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 09:20 AM |
| She said to sum up the mass of all parts. |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 10:16 AM |
Ok I got the totalmass but output doesn't agree this time
b1.force = (Totalmass *2)
17:14:18.265 - Players.Player.Backpack.LocalScript:63: attempt to perform arithmetic on global 'Totalmass' (a nil value)
????? |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 10:17 AM |
| You didn't define Totalmass. |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 10:20 AM |
I forgot to capitalize the M sorry but now I get this
Players.Player.Backpack.LocalScript:64: bad argument #3 to 'force' (Vector3 expected, got number)
Also thanks for bearing with me appreciate it man. |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 10:21 AM |
| Nvm fixed that, but the player still won't move. |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 10:22 AM |
I don't know the problem, and I need to go now. :( You did put it in HumanoidRootPart though, right? |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 10:28 AM |
I printed the totalmass of the player and it's 14.1? Then I decided to multiple the Totalmass times the vector3.new 4, 0, 0
Don't know if this is right |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 11:29 AM |
| Use bodyVelocity instead, if you want to limit the speed |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 11:42 AM |
| The property "Force" is called force not Force |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 26 May 2015 11:42 AM |
| I didn't know I was being that advanced in scripting that nobody would know the answer lol, just kidding I suck at scripting. Thanks for helping me out guis, I'll fix this another time. |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 11:45 AM |
Use the function called Wind, in the old Football Legends code, which is uncopylocked.
FL, uses it to move the Player backwards, after a "block". |
|
|
| Report Abuse |
|
|
|
| 26 May 2015 11:45 AM |
Body-Movers are all about experimenting. It is nearly impossible to get it right on the first time. Just keep trying until you get there.
Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784 |
|
|
| Report Abuse |
|
|