Wall stick/Gravity Controller

Hi! I’m spawning with a normal spawn pad.

Mmm yes i had to play the game to see what u were talking about. Make sure you manually set the character to match the spawn up normal when they spawn in. Read the API for it

2 Likes

Thank you so much! Would you mind sending me the link to the API your talking about? I’m a beginner scripter…

Im on mobile rn, but iirc i wrote the API at the top of the module.

I believe the methods named :Set(part, normal) but that’s just going off memory so those might not be the correct params.

3 Likes

Hey, I just searched through the OS game for the wall stick, I didn’t find an API documentation? Is the documentation on your github?

I found this after searching on Google: https://github.com/EgoMoose/Custom-Character-Controller

1 Like

I didn’t find an API reference…

If anyone knows how to help me, here is the link to my help request. I asked @EgoMoose, however he was unable to help me as he was on his phone.

Is there a way to disable and enable the controller when the player touches a part? I tried disabling and enabling it with my own knowing and nothing worked Lol.

2 Likes

Insert the part in the ignore list in the LocalScript in the StarterCharacterScripts.

And I want to ask something: @EgoMoose, is here any possibility ti adapt your Gravity Module to a normal Part? Not only Players but normal parts? I am just wondering.

2 Likes

@EgoMoose How to make it so if objects that are CanCollide to false, it doesn’t change your gravity, and yeah, like what the last message post said, Is there a possibility to adapt your gravity module to a normal part?

I love it! Can you make it compatible with grass decoration/R15? I notice it makes characters float a bit.

1 Like

How would I go about fixing the wall stick after getting out of a seat in something like a ship where the direction of the the floor will be different depending. Currently i am trying to set the direction after the player gets up from the cock pit, but im tyring to keep the player from flinging around after getting up from the seat, and either way, they wont reorient to the main floor.

love you man :smiley:
I’ve been waiting for someone to come up with this. I’ll have a look into the module to understand it, but thanks!

2 Likes

This recource is fantastic. Quick question though. I have a function for a flight seat, and i’m disabling the wallstick (with wallstick:Destroy()) then renabling it (with the whole wallstick.new() thingy) directly after the player gets up from the seat… but then the set function I have right after that wont work :confused:. Why is that?

The Ship_Controller.Enabled(false/true) is the wallstick enabler/disabler, it just sends to another function that destroys the wallstick or creates a new one. The issue im having has nothing to do with this function, i tried it without the function aswell. :confused:

3 Likes

The issue you are dealing with was a bit finicky in older versions. If you get wallstick from the repo linked in the OP then the issue w/ seats is now fixed. You don’t have to destroy and recreate it anymore!

As a side note, I have to say your choice of script editor font is definitiely not common and gave me a bit of a chuckle :laughing:

6 Likes

Thanks so much for your reply I appreciate you taking the time!

And yeah I like my font, it’s very differret :smiley:

2 Likes

Is it possible to attribute the gravity controller to objects such as a motorcycle?

I’m having some weird behaviour on my end. Every so often my player will simply die for no apparent reason. I haven’t got any code that kills the player or anything. I think it is related to falling because it often happens after I jump and / or fall.

By the way this uses the latest repo. This issue happens on the older version of the wall stick too, but very rarely.

I died at around 10 seconds and 40 seconds for no reason. Any idea why this might be happening?

My theory is that some CFrame math went wrong because whenever I am dead my character is missing and I don’t hear the ‘OOF’ sound.

1 Like

Hello, I’m having some trouble implementing WallStick on a Cylindrical part. The surface normal is different all over the part. But the WallStick code seems to assume that the surface normal will be the same over the entire part.

It’s also happening with a large MeshPart, I want the character to be able to walk on it sideways and upside down, but it is all one part, so the part of the code that waits for the floor to change to a new part, is never triggered.

I tried modifying the code to always pass the new normal, even when the floor part is unchanged, but there seems to be multiple places where the previous part is cached. Even after trying to remove those, I still got strange behavior with the Character seeming to hit an invisible wall and walking with the wrong normal (that of the first surface of the MeshPart he touched).

I tried adding a cylinder to the WallStick.rbxl placefile but the character seems to bounce off and then fall into space. Any suggestions on how to handle parts/meshes which have varying surface normals?

Thanks so much!

1 Like