Now while I pride myself on my ability to figure out scripting problems myself, I have to accept defeat on this one.
I’m currently making a game where the setting is in space. When you go outside the gravity should be different, ( gravity value being 100) but no matter what I tried it changed the gravity sever wide for everyone.
So in short I need help making a local gravity system.
Edit: I tried local scripts but couldn’t quite figure out the code for it.
This is very generic, please be more specific of what solutions you have attempted since it may help us construct a more individual solution since we get a wider view of how you wish the system to work as well as a basis to expand ideas off.
Changing gravity itself won’t help much since the player will still have a sense of direction (up and down), scripting a custom camera may be necessary. You could use body forces instead of changing the value of gravity.
We really need more information about what you are trying to solve. Does gravity need to be in different directions at different places (say like on a planet or near a star)? Obviously the strength needs to change depending on where the user is, but is in only on / off or in specific regions? Will it continuously change based on distance, again like on a planet?
I’ve had good experiences with LineForce objects which have a InverseSquareLaw property which allows the Roblox physics engine to handle calculating the changing force magnitude based on distance. It also allows you to calculate gravity to multiple objects.