generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to use the bodyforce instance?

Previous Thread :: Next Thread 
Raidorz is not online. 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 is not online. Raidorz
Joined: 28 Apr 2011
Total Posts: 5221
26 May 2015 08:31 AM
Bump.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
26 May 2015 08:35 AM
Try jumping.
Report Abuse
deedeedum is not online. deedeedum
Joined: 15 Jan 2007
Total Posts: 19
26 May 2015 08:37 AM
try scriping it
Report Abuse
Raidorz is not online. 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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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 is not online. 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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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 is not online. 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 is not online. 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 is not online. 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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
26 May 2015 09:20 AM
She said to sum up the mass of all parts.
Report Abuse
Raidorz is not online. 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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
26 May 2015 10:17 AM
You didn't define Totalmass.
Report Abuse
Raidorz is not online. 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 is not online. 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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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 is not online. 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
distalDigitPhalanx is not online. distalDigitPhalanx
Joined: 25 Jan 2015
Total Posts: 1509
26 May 2015 11:29 AM
Use bodyVelocity instead, if you want to limit the speed
Report Abuse
TheCreationWorld is not online. TheCreationWorld
Joined: 02 Nov 2014
Total Posts: 568
26 May 2015 11:42 AM
The property "Force" is called force not Force
Report Abuse
Raidorz is not online. 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
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
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
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image