Wall stick/Gravity Controller

Hello again! This is now my third post regarding gravity controllers. I’ve been playing around with them on and off over the past two years. I’ve learned a lot and as a result have gone through a number of iterations that vastly improve the techniques used.

Now what I’m posting today is actually two separate controllers. They both have different use cases so please do read the whole post before deciding which one you’d like to use in your game or play with, etc.

Okay, so on with the show! :partying_face:

Wall stick controller

Update [12/06/20]: See the most updated version of the wallstick controller here:

If you’ve seen my previous post(s) this controller will be familiar to you. The concept is that we have a de-rotated world transparent and way off in the distance that we traverse with a fake character. We then replicate that fake character’s movement over to our real character which gives the appearance of defying gravity and walking on walls and so forth.

Now, the largest change here from my previous iteration (aside from an overall cleanup and simplification of some math), is that we no longer use body movers. Originally the reason I chose to use body movers was because they replicate nicely. However, what body movers do not do nicely is move fast enough to keep up with the physics that affect parts and so forth. So now we use CFrames and we replicate our character movement ourselves.

This change allows for much greater accuracy when it comes to standing on any moving platform.

You can run around on moving objects that are either CFramed or being moved by a body movers:

You can stand on a plane with another character driving it:

Heck, you can even ride on a part that’s being flung across the map with physics

Now it does have a couple issues that I’m aware of, but they’re pretty minor.

  • It’s not really well defined when the player falls off the map so sometimes you just get stuck and never die (unless you reset)
  • The player can’t use seats while the controller is active. In the video above I disable the controller before sitting on it
  • The .Touched event can be a little crazy when registering the character. I suppose technically because the character is being cframed sometimes this can cause repeat firing or no firing at all.
  • The popper cam isn’t quite perfect. I’m kinda stumped on this one to be honest. It works pretty well, but especially when on moving platforms is kinda clips through walls a little bit. For now I’m blaming it on floating point error, but it’s probably not that :stuck_out_tongue_closed_eyes:.
  • Probably the biggest one: It doesn’t work with terrain!

You can also use this version which fixes a lot of the camera issues. I’m not sure why the place has such a large number of dislikes, but it’s arguably better than the above in every way.

Gravity controller

[Update 1/13/20]: See the most recent version of gravity controller here:

This controller is true to its name in that it controls gravity and that’s about it, it doesn’t have any of the other wacky physics abilities of the other controller, but it does handle certain things better such as the ability to walk on curved surfaces and yes, the ability to walk on terrain.

Now the main downside to this controller is that we lose all the benefits of humanoid state tracking. I added a very very simple state tracker for animation purposes, but it really only does the bare minimum.

Again, it does have some issues of its own:

  • Again, if a player falls off the map you may end up falling forever
  • The player can’t use seats when the controller is active
  • As mentioned there’s no state tracking when using this controller.

Final words

Finally, I want to make two things very clear.

First, I have no intention to support these controllers going forward. If there’s a bug you’ll have to figure it out. If Roblox pushes an update that breaks these bad boys, guess who has to fix this sucker… you! :point_left: If you send me a message regarding any of these problems I will not respond to it.

Secondly, and this is probably unsurprising, I don’t intend to make another iteration of these controllers. You’re more than welcome to build upon my work and share it (I’d certainly enjoy that), but I think I’m done with these. If I do make another iteration I don’t intend to release it.

That’s all folks.

Hope you enjoy and make some cool stuff with this! Cheers :+1:

[Release] Custom character controller
Gravity controller
Character walking upside down
Smooth player standing on the train system?
Gravity Controller (NEED HELP)
Gravity type game
[canceled] Hiring a scripter for an animated interactive story game!
Would "insect legs" in Roblox even be possible?
What is the best way to create directional gravity?
How to weld a player to an elevator?
How to make part/model move you along with it
Wall Stick Spawn Issues
Player standing on a part moved by Velocity & BodyForce?
Players not sticking to moving platform [2]
Gravity controller bug
Keep player smooth on moving platform?
What is the best way to script a train?
Help With Realistic Zero-Gravity/Microgravity
How would I go about changing the player's target up vector?
Unable to Jump *Sometimes* - Issues with ControlModule; TouchJump Modules
Custom Character Controller Help
What ideas sound interesting for obby levels?
Does anyone know how to flip gravity?
How do I use gravity controller to make gravity go a certain direction?
Custom Character Controller Help
How a wallrun script works?(explaination needed)
How did they make this stick to wall?
Running around a sphere
Gravity/physics manipulation
Making the camera pan relative to the characters orientation
How did they make this stick to wall?
Thoughts on my Gravity-based game? (WIP)
How to make gravity control?
How can I change gravity for characters like in some levels of silhouette? (If you have source code please tell me, or how I could pull this off!)
Attempted To Index Nil with "Connect"
How to check if a Player is holding Space?
Player Unable to Jump
Checking Vector3Value.Value Accurately
Detecting if a Player is near Part(s) and Terrain
How would I make slope tilting?
Player *sometimes* cannot Jump while Sprinting
Aircraft fall off carrier deck when moving?
Can I make Robloxian climb ceiling stairs?
How can you make a cartoony unrealistic movement on a sphere?
Moving a part while accounting for collisions
Attach player to tweening model
Ring Gravity, velocity and cframe angles
Wall Stick Spawn Issues

One of the most nauseating creations i’ve ever seen, yet also the most brilliant!
Having tried to create as you called a ‘wall stick’ controller in the past, I feel a high quality, open source one could inspire so many innovative game ideas!

Always love your posts since there is always something fun to keep me entertained for a while!


This is absolutely amazing and I’m definitely going to use it for something. Although I ran into an issue with the gravity controller that wasn’t specified: Objects that are CanCollide false still effect your gravity.


Yes, that’s because I lazily threw together the method that sets the normal. In my case I just did a ring-like raycast around the player. But for your case you may want to ignore any objects a ray hits that are not can collide or you may not even want to use raycasting at all. You only need to have the method return a new gravity up vector.


Thanks! I got it working after a bit of trial and error.


Again, if a player falls off the map you may end up falling forever

For this problem with the Wall stick controller.
Could you not just detect if the player is falling and use a large downward raycast?
If the raycast doesn’t hit anything and the character is falling for a period of time you could kill the player.


Yes you could do that if that’s an acceptable enough check for you.


First Person/Shift Lock also seem to have issues:

You also can’t jump very far if you look down with your camera:


Both those problems should be fixed now.

The jump was an interesting one (not quite sure why the fix worked, but it did). As for the first person/shift lock, it’s not an exact replica. I had to use a body gyro to spin the character b/c it seems most of that code is under the hood.


You are the best! Thank you for this.
Very cool.


These are great! Thank you for open sourcing these. I’m sure these will lead to loads of cool ideas/games/concepts and the like.

That said, regarding your Gravity Controller if I wanted to modify this so that rather than falling from a ledge or corner when walking off of it, the player instead “snaps” to walk on the surface below/behind them instead, how would I go about that?

I have a means of detecting the surface desired to move to and have tried snapping the character’s hrp CFrame to the desired angle/location on the surface - however the player snaps back to their gravity/orientation before being moved and proceeds to fall, as if the controller isn’t updating their gravity. Any insight into what would be best to look into changing/modifying would be massively appreciated.


I love the Gravity Controller ! I’m creating a Roblox game with this, and i’m wondering how can i disable and enable the Gravity Controller with a part Touched script. Can you help me ?


Possibly by having a instance.new part that is the controller, and have it so on the touch it creates the part in the player.


Can you give me more details and give me more instructions? Because i don’t completely understand the module.


I found a way for disabling the controller, but when i enable it again, by doing
Controller = GravityController.new(game.Players.LocalPlayer) it doesn’t work and keep the default roblox gravity.


Is it possible to whitelist parts so that players can stick on only some parts?


Yes, absolutely. I’d recommend doing that in the method that sets/returns the normal/part. Just use raycast with whitelist or something similar.


Our boi back with another studio miracle.

love what you’re doing.Keep up :heart:


Also I downloaded the game and made a hangout style of it.

I also gave you credit for the physics.

I absolutely love this! If you can get the right people, you can remake super mario galaxy :smile: