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 » Scripting Helpers
Home Search
 

Re: I need help with a script

Previous Thread :: Next Thread 
ZQFMGB12 is not online. ZQFMGB12
Joined: 07 Aug 2010
Total Posts: 208
10 Jun 2014 09:32 PM
Something isn't right with the following code:

while wait(0.03) do
workspace.Part.BodyForce.force = Vector3.new(0,1000,0) * 25
end

The force property assignment is in a loop because it needs to be updated frequently (not shown in the code). The desired effect is that the unanchored Part is supposed to counter regular gravity. However, it doesn't happen, though if force is changed in the properties menu, it works. Does anybody know what's wrong?
Report Abuse
ZQFMGB12 is not online. ZQFMGB12
Joined: 07 Aug 2010
Total Posts: 208
10 Jun 2014 09:38 PM
bump
Report Abuse
jav2612 is not online. jav2612
Joined: 14 Jun 2010
Total Posts: 1189
10 Jun 2014 09:40 PM
while true do
wait()
part = Workspace.Part
part.BodyForce.force = Vector3.new(0, part:GetMass() * 196.25, 0)
end


I'm pretty sure a part's mass * 196.25 will keep it up using bodyforce.
Report Abuse
ZQFMGB12 is not online. ZQFMGB12
Joined: 07 Aug 2010
Total Posts: 208
10 Jun 2014 09:42 PM
nvm, fixed the problem, it was a weird assignment error somewhere else in the code
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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