Instantaneous movement velocity[SOLVED]

i’ve seen in roblox a lot of movement systems that seem to somehow change some functionality to the roblox default movement scripts, especially by making it slide more(which makes it more realistic), in my case, i want the opposite, to stop and go instantly, how would i make it?
i wan’t a movement system similar to this:


do you need to use controllers like vectorforce, linearvelocity, or even assemblylinearvelocity to achieve this?
here’s how it is to me:

it might be unnoticable at first but i’m having extremely trouble moving left and right because of how unresponsive the character is.

how would you make the player velocity so that when they press any key it responds instantly like in the example, and when no keys are pressed, the player velocity stops instantly

i tried this:

UserInputService.InputBegan:Connect(function(input)
			if input.KeyCode == Enum.KeyCode.W then
			humanoid.WalkSpeed = 85
			elseif input.KeyCode == Enum.KeyCode.S then
				humanoid.WalkSpeed = 85
			elseif input.KeyCode == Enum.KeyCode.A then
				humanoid.WalkSpeed = 85
			elseif input.KeyCode == Enum.KeyCode.D then
				humanoid.WalkSpeed = 85
			end
		end)

	UserInputService.InputEnded:Connect(function(input)
			if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.S or input.KeyCode == Enum.KeyCode.A or input.KeyCode == Enum.KeyCode.D then
				-- set walkspeed to 0
				humanoid.WalkSpeed = 0
				end
		end)
		

the code doesn’t work
i believe the movement system i wanna replicate has some kind of system like this

UserInputService.InputBegan:Connect(function(input)
			if input.KeyCode == Enum.KeyCode.W then
                --player goes fast in that direction
			elseif input.KeyCode == Enum.KeyCode.S then
				---player goes fast in that direction
			elseif input.KeyCode == Enum.KeyCode.A then
				---player goes fast in that direction
			elseif input.KeyCode == Enum.KeyCode.D then
				---player goes fast in that direction
			end
		end)

	UserInputService.InputEnded:Connect(function(input)
			if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.S or input.KeyCode == Enum.KeyCode.A or input.KeyCode == Enum.KeyCode.D then
				-- player velocity stops
				end
		end)

help is appreciated!

Try setting velocity to Vector3.zero when stopping maybe that could work

maybe i could use vector force or assemblylinearvelocity to achieve this? if so how could i?

You want it to stop instantly or you want the opposite ?
You can manipulate the floor customphysical properties to make the character slide or not

For exemple, friction to 0 and friction weight to 100 will make the character slide a lot and will take more time to stop moving

that’s not what i wanted, how could you make the character more responsive when you press any move, or move instantly. in roblox default scripts, the movement(especially in air) takes time to respond and slides a lot, and it becomes more unresponsive the faster the character is, it might not be noticable when the walkspeed is 16, but it definitely is when walkspeed is 85 and you’re trying to make a movement system similar to speedrun 4, which slides a lot and doesn’t make for a responsive movement.

help is needed pls i still didn’t get an answer.

solved: by this vid:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.