Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make humanoid Jumped event longer???

Asked by 7 years ago
Edited 7 years ago

How can I make the gravity of a single object in workspace change?

-- set gravitational pull to 0
script.Parent.BodyForce.force = Vector3.new(0, game.Workspace.Gravity, 0) * script.Parent:GetMass() --Body Force doesn;t work anymore sadily so how can I do this?

http://wiki.roblox.com/index.php?title=Gravity

Mos tof the stuff here is depreciated, so help please?

2 answers

Log in to vote
1
Answered by
Validark 1580 Snack Break Moderation Voter
7 years ago
Edited 7 years ago

Humanoid.JumpPower!

These can be used for non-players:

Experiment with these

(Scroll down to Inherited Classes)

If you insert a BodyThrust and set the Y value somehow proportional to the Mass, it will counteract gravity.

Otherwise, get admin commands and try the setgrav command and see what gets added to your character!

0
Try Humanoid.JumpPower instead of my original answer Validark 1580 — 7y
Ad
Log in to vote
1
Answered by
Bellyrium 310 Moderation Voter
7 years ago

This is an example script for 1 part to negate gravity.

local BodyForce = Instance.new("BodyForce") -- makes a force useful for this 
BodyForce.force = Vector3.new(0, game.Workspace.Gravity, 0) * script.Parent:GetMass() -- makes BodyForce exert force equal to negative gravity * the weight of the part 
BodyForce.Parent = script.Parent

Add each part in a models mass to get the total mass and place the script in the root part or something.

As for deprecation; tested my self and works..

Answer this question