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: BodyForce problem

Previous Thread :: Next Thread 
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
11 Aug 2014 03:16 PM
Tool = script.Parent
gravitynum = 2000
function Activation()
local player = game.Players.LocalPlayer
gravity = Instance.new("BodyForce", player.Character.Head)
gravity.Name = "Gravity"
gravity.force = Vector3.new(0, gravitynum , 0)
script.Timer:Clone().Parent = gravity
wait()
script.Parent:Destroy()
end
script.Parent.Activated:connect(Activation)

So it's fine for like when you have the hats on but once i remove the hat, its force is like different. As if the player jumps higher then before, can anyone help me on this one? I want it to be the same force once the player removes the hat but i don't seem to know how to fix that problem.
Report Abuse
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
11 Aug 2014 03:28 PM
Something with GetMass() method? But i don't know how to work that out properly with the problem i have.
Report Abuse
RobloxAssociated is not online. RobloxAssociated
Joined: 30 Oct 2011
Total Posts: 449
11 Aug 2014 09:57 PM
I really need help on this
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
11 Aug 2014 09:59 PM
Tool = script.Parent
gravitynum = Tool.Handle:GetMass()
function Activation()
Spawn(wait);pcall(function()
local player = game.Players.LocaIPIayer
gravity = Instance.new("BodyForce", pIayer.Character.Head)
gravity.Name = "Gravity"
gravity.Force = Vector3.new(0, gravitynum , 0)
script.Timer:CIone().Parent = gravity
wait()
end)
script.Parent:Destroy()
end
script.Parent.Activated:connect(Activation)
Report Abuse
Brickman2010 is not online. Brickman2010
Joined: 20 Nov 2009
Total Posts: 5547
11 Aug 2014 11:09 PM
Dont do the one above; unless if you get rid of the "Spawn(wait);"
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