How would I make a zone based gravity system?

So basically, I have been viewing how Super Mario Galaxy’s gravity system works and I figured out that it goes by zones. When you enter that zone your gravity will change. There are different zones for different shapes. I have seen EgoMoose’s gravity controller but it attaches to everything. How would I be able to make a zone based gravity system?

In regards to defining specific zones, you can try Region3.

That could assist me a little bit but making an actual gravity script would be difficult

Workspace.Gravity is the property for gravity, this page also provides an example to affecting the gravity when a button is pressed. Maybe it’s not simple but it’s worth experimentation. Define a zone with Region3 and when you detect a player enter it, you can change the gravity strength

I want to make the player attach to the insides of the zone, for example if there was a cube inside of this zone the player would attach to it, be able to jump and everything else but being attached to the cube.

You can try ZonePlus. It’s a module created by @ForeverHD for determining what zones the player is in.

For @EgoMoose’s gravity controller you just have to reset the players gravity when entering a new zone. Just because it sticks to everything by default doesn’t mean that you don’t have methods to control it.

Reading through the module you’ll find that it has this function:

function GravityControllerClass:ResetGravity(gravity)
	self._gravityUp = gravity
	self._fallStart = self.HRP.Position:Dot(gravity)
end

I’m guessing you can use this to set the direction the players gravity is in. However, because the default value is Vector3.new(0,1,0), I’m guessing this is a multiplier for the workspace gravity.

I’ll try that and I’ll get back to you

workspace.Gravity in unison with Region3 values.

The Region3 functions have all been deprecated and replaced with the new spatial query methods. You shouldn’t use them anymore because the new methods are faster, more versatile in shape, and have a greater much greater resolution for the size of the zone.

I believe they have been superseded, which isn’t explicitly deprecated.

This was near the bottom of the post.