How to change gravity in certain area?

How can I change gravity in a certain area?

I want to create a “fun zone” for my game, where when you enter into it, your faster and can jump really high, and then when you exit youre back to normal.

Create a region 3 check if a character is in that region.
If there is a player in that region then increase the WalkSpeed and JumpPower.

1 Like

Ok i understand that, however I am not sure how I would code that…

Make a invisible wall around the zone. Set the cancollide to false. Add a script into the wall:

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFIrstChild("Humanoid") then
        hit.Parent.Humanoid.WalkSpeed = 17
        hit.Parent.Humanoid.JumpPower = 50
    end
end)

And then add another invisible part, cancollide false as well, and this will be the area where if the player is inside it, they will be able to walk and jump fast. Add this script into the part.

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFIrstChild("Humanoid") then
        hit.Parent.Humanoid.WalkSpeed = 30
        hit.Parent.Humanoid.JumpPower = 150
    end
end)

If this worked, set it as solution will be appreciated :slight_smile:

2 Likes

Workspace.Gravity (roblox.com)
This page is listed of a gravity stuff, i think this is helpful so i think this will help

After some edits it seems to work well enough now thank you!!

It would be very appreciated if you would set it as solution so oters will know this has been solved :slight_smile:

It is funny how people want others to spoon feed the code.

Dev forum is a place to get help and get info on how to approach in solving the problem and not a place to ask for scripts written for them.
Please keep that in mind and if you don’t know how to code then learn it , for the later run it will be worth it .

1 Like

this isn’t so appropirate, low gravity means not just jumping high, you will fall down slowly, you should also make the character mass less

Yes, but most people consider it better for jump power instead of low gravity. Because if you only have low gravity you just fll slower but jump height is the same. Also, if I leave the gravity the same, it makes it more exciting as the player falls down faster.

Yes it can be exicting, but its not realistic if added in a roleplay world games

Actually, it is realistic if you could jump high and fall down the same speed, according to Newton’s law of universal gravitation.