New Bunny Hoppy Movement Code

Ive said this before but i really like this controller. theres this infinte yeild warning just wanna make sure like its not a gamebreaking thing

image

1 Like

That is something that happens to me as well. I think it it because the code replaces the default ControlScript which does not have a MasterControl. The CameraScript tries to access this in the VRCamera script, but can’t because its not there. So this only effects VR, which is not supported anyways. So you should be all good!

If you want to get rid of this warning (even though it won’t effect anything), you would have to make your own camera script.

3 Likes

Hey I’ve been wondering if there was some kind of way for this b-hopping effect to take place when I artificially add velocity to the player. If you don’t get what I mean here is what I want:

  1. Player gets propelled into the air (i.e an explosion or a launch pad)
  2. Player begins strafing mid-air (pressing D and moving camera to the right)
  3. Strafing begins to take place

Is that still possible even with the :Move() codebase you have?

1 Like

Well the code moves still using Roblox’s default humanoid movement system. If it would work with the default movement code it should work with mine.

Whether you try and add this artificial velocity through the velocity on the humanoidRootPart or a bodyVelocity, it shouldn’t matter.

If you do run into problems, let me know and I can try an help you!

2 Likes

Thanks for responding!

Oh and by the way, is there any specific instructions on setting this up? Your old movement code said that there were a lot of things needed like 1000 walkspeed, no friction, etc etc

1 Like

With my new code there is nothing like that you need to change!

5 Likes

For this code, I’m not sure if it is the bhop causing it or just roblox but, if you hold a button (wasd & spacebar) and chat then let go of the button then click out of chat you will still keep walking although there was no input.

2 Likes

Yeah your right, this is not something that happens with roblox, but since I made my own input system using the context to action service.

Personally, I do not think that this is too much of a problem and I don’t really feel like fixing it lol.

If you do find out a way to fix it, please let me know. Thanks!

1 Like

Gotcha, thank you and will do (if I ever find out).

2 Likes

My friend seems to have a certain bug with this that makes them run at extreme speeds, but it works completely fine for me.

2 Likes

Huh, I have had that happen with my old code but with the new one that I posted on this forum I haven’t had that happen. If you can figure out why it happens or even fix it, then let me know.

1 Like

My friend took a wild guess that it might act differently with certain body parts, but I can’t really get my head around how it all works atm. Were you updating the code in the same link?

1 Like

That could be true, now that I think about it I have only ever used the thing with r6 avatars. I have never really thought about r15 or rthro. I’ll try and look into it.

2 Likes

A bit confused, I’m an Avid Csgo player, and I do a lot of airstrafing/csgo bhopping etc I’m assuming this script is meant to replicate that right? I’m noticing a lot of things that this system doesn’t include, correct me if I’m wrong but the biggest one is, this doesn’t include air strafing at all does it? Theres no velocity being gained, Also I’m noticing that if you turn your mouse around too quickly to head the other way you lose all speed, I’ve been trying to replicate a system like bhop - Roblox

This, for quite some time, looking for different resources, is this system that you’ve made not intended to be like that where you gain speed through air strafing? and if so what is this for? What’s the point in bhopping if no speed is gained?

3 Likes

Yeah I have noticed the difference between my movement and csgo the reason is probably because I used this code from unity: Quake III movement (Strafe jumping) in Unity [#1] - YouTube, and translated that into lua pretty much. It appears that this bhop stuff was based off of quake. I originally used this code: Bunnyhopping from the Programmer's Perspective, but I did not like it because it was giving me some weird bugs that I could not solve.

Oh and also in my game I added a max velocity cap, because the players could get to fast and that messed with the gameplay, especially because it was really easy to bhop cause I had auto jump on.

If you set the maxSpeed to a higher value or removed the velocity cap altogether, then adjusted some of the variables you could probably get it very similar to what you want. What variables you need to adjust, i don’t know. It’s very complicated math that I don’t even understand.

2 Likes

Mmm. Maybe I’ll toy around a bit more with yours, I’m just struggling finding how tf @Quaternions managed to get the system exactly how csgo did, I thought I was pretty decent at scripting but holy, the math involved with strafing, and all that stuff has been confusing tf out of me, Thank you for the resource anyways I’m gonna try to achieve what I need it sucks that the resources on this topic are kinda limited though but thanks! was just curious

1 Like

has a wise man wants said, "hippty hoppty this code is now my property. with credit of course "

3 Likes

Hey really cool script! Although I have found the bunny hopping is a bit too abusive and I also want my bunny hopping to be more like the bunny hopping in Apex Legends so I made some modifications try it out for yourself if you want.

local LastJumpTime = 0
local JumpCount = 0
local Jumped

local function onJump(actionName, inputState)
	
	if inputState == Enum.UserInputState.Begin then
		if JumpCount <= 15 and LastJumpTime - tick() > -1 then
		Cmd.jump = true
		Cmd.justPressed = true
		Jumped = true
			print(JumpCount)
			print(LastJumpTime - tick())
		elseif LastJumpTime - tick() <= -1 then
			Cmd.jump = true
			Cmd.justPressed = true
			Jumped = true
			JumpCount = 1
			LastJumpTime = tick()
			print(JumpCount)
			print(LastJumpTime - tick())
		else	
			Jumped = false
		end
			
	elseif inputState == Enum.UserInputState.End then
		if Jumped == true then
			Cmd.jump = false
			LastJumpTime = tick()
			JumpCount = JumpCount + 1			
		end
	end

end

3 Likes

Is this possible to be done server sided? To avoid exploiters and such

2 Likes

Movement on roblox is never done on the server. Roblox doesn’t really allow it.

3 Likes