Wall stick/Gravity Controller

Experiencing something really weird while using it in a ragdoll game. Ragdoll bug is due to changing humanoid state to getting up that I understand but what about these?

Terrain Bug - Weird behavior, looks like player is being treated as he is jumping… Animation doesn’t work on terrain sometimes.

Ragdoll Bug - which I know what’s causing to make it walk while ragdoll but look at the camera disturbance.

Walking on a part with linear velocity: That’s something strange.

1 Like

I got this error

  20:47:12.855  ReplicatedStorage.Wallstick.CharacterModules.Camera:34: attempt to call a nil value  -  Client - Camera:34
1 Like

Hey again @EgoMoose! I just had one quick question, how would I make a player spawn upside-down. So, that they actually spawn on the spawn location, even though it’s on the underside. Since now, Roblox automatically spawns it on the top side (the “correct” way). But I’d like the player to spawn upside down, as without them having to walk to the underside of the brick.

Is there any way to achieve this? Thank you :slight_smile: !

Edit: I tried this, but it kind of bugged out and I just fell of the part:

It basically just rotated the so it would look like he is standing up side down, and I hoped that the hravity controller would «suck» the player to the ground. But no.

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character.HumanoidRootPart.Position = Vector3.new(5.81, 165.634, -184.292)
		character.HumanoidRootPart.CFrame *= CFrame.Angles(0, math.random(90), math.rad(180))

	end)
end)

If anyone else than @EgoMoose knows, then feel free to answer too!

1 Like

Make the whole world upside down so the player feels upside down when they spawn normally.

2 Likes

Thanks for the input. But this won‘t work for me, since I want to be able to teleport the players onto whatever side (top/bottom) I want without having to rotate the game. Thanks nevertheless!

2 Likes

This is unbelievable!

Straight up incredible. We need more dedicated developers like you on Roblox. Then the platform will be great again!

1 Like

There is a function where you can directly set the world normal, i cant remember what it is but its in the client handler somewhere it shouldnt be hard to find. Its used by internal code so you should find other references to it (Look for where it sets the floor part to TERRAIN, there it sets the world normal to 0,1,0 (upright) so you should find it there)

Using this function, set the players world normal to 0, -1, 0 when they spawn in. They will spawn upright and then flip around, which is a problem, but if you change the transition rate you can make this almost unnoticeable.

There’s almost definitely a better way to do this but this is how I’ve done it in the past.

edit: bear in mind the wallstick will attempt to stick to the floor the player spawn on as soon as they spawn, so maybe disable the downwards raycast for half a second or so until they have landed upside down. Or, just make them spawn in the air so that they dont stick to the floor at all.

1 Like

Woah this is actually kinda insane O_O great job

1 Like

How can I make it so the player only sticks to the floor, I don’t want players walking on walls or roofs.

3 Likes

Don’t turn it on? If you only want them sticking to the floor, just don’t use the module. :sweat_smile: Perhaps I misunderstood though?

I’m trying to create a train were players can stick on, that’s why I don’t want players sticking on walls or roofs I just want them to stay and stick on the floor to move with the train.

Hey! I am making a project needing this but is there any way I can uset he gravity tool without it equipped aka no matter what, the gravity controller works even without the tool?

1 Like

you will have to edit the code and make it ignore parts with the attibute ‘Wall’, then add the attribute ‘Wall’ to your train walls

Would there be a way to have it work the other way around? Like the wallstick ignoring everything else but the floor? I also create trains, and a way to allow a character to walk around stably in a cabin while moving would be revolutionary for I and lots of others.

You can make the gravity controller ignore parts without the attribute Floor, then add the attribute Floor to your train floor.

Important, Experience-Breaking: Line 193 in the PlayerScriptsLoader for the Gravity Controller makes the whole experience unplayable.

You can see this happening for yourself in the open source experience: Gravity Controller - Roblox

My fix was to comment out this line. Everything seemed to return to normal after this.

2 Likes

Fixed in the place file. Have yet to update the repository though.Thanks for the report!

6 Likes

You should also fix the GitHub Rbx-Wallstick, it is broken:

  • The line 193 of the PlayerScriptsLoader breaks the script, due to Roblox’s latest VR update
  • Sometimes jumping will send the character far away
  • The player doesn’t collide properly with curved and moving parts

Already fixed for the VR update days ago.

Regarding the other two points you either have to give me a consistent reproduction or make a PR yourself if you know the issue.

2 Likes

When I try your game, this is what happens to me when I go on moving or curved parts:

All of the mentioned bugs (except the jumping bug) always happen in the repro.