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

How to edit gravity? [closed]

Asked by
RedCombee 585 Moderation Voter
9 years ago

I am interested in editing the players' jumping abilities.

Locked by RedCombee, Tortelloni, and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 9 years ago

Your best bet is to insert a BodyForce Instance into one or every of players' limbs.

A local script that demonstrates this.

p = game.Players.LocalPlayer

bf = Instance.new("BodyForce")
bf.force = Vector3.new(0, 400, 0) -- the Y should be edited to your needs. this should also be placed in StarterGui or StarterPack

for i, v in pairs(p.Character:GetChildren()) do
    if v:IsA("BasePart") then
        bf:Clone().Parent = v
    end
end

A server side script that demonstrates this.

bf = Instance.new("BodyForce")
bf.force = Vector3.new(0, 400, 0) --

game.Players.PlayerAdded:connect(
function(p)
    p.CharacterAdded:connect(
    function()
        for i, v in pairs(p.Character:GetChildren()) do
            if v:isA("BasePart") then
                bf:Clone().Parent = v
            end
        end
    end
    )
end
)
Ad