How could I make a movement system like Evade

I want to make a movement system like Evade where you slowly stop moving when you stop moving (Not holding WASD)

I don’t know how, I can’t seem to find out if they use Apply Impulse or if they use something else, even if they do I don’t know how I can implement it so it goes to where I’m WALKING not FACING.

I have tried many sites such as DevForum, no luck.
I have no code yet btw I just wanna know how it would be possible so I can use it in a game in the future (when I can work on it)

5 Likes

Try setting the humanoidrootpart friction and friction weight lower in CustomPhysicalProperties?

1 Like

It’s easy heh: use the userinputservice with the enum.kercode.w wait(5)
walskpeed = 500

2 Likes

im not sure what you mean, but what I did was use Quenty’s spring module, then used the :GetMoveVector() on the ControlModule which is under the player’s PlayerModule (default roblox stuff).

then I used BindToRenderStep with a function that would set the target of the spring to what I got from :GetMoveVector() and also used :Move(spring.Position, true) on the player - this makes the players speed “smooth” down and up instead of stop and start immediately

sorry if it was a bad explanation

8 Likes

Honestly your gonna hate yourself for not figuring this one out but,

You can simply in a heartbeat loop smoothly ramp up the walkspeed to a MAX_SPEED when their move direction is not equal to 0 (moving), and when it is smoothly ramp down the walkspeed to the BASE_SPEED when their movedirection is equal to 0 (not moving).

I recently did this with one of my projects and it feels AMAZING.

8 Likes

This code does not make any sense, please know that you should be good at scripting to help with scripting related issues. This code represents what you’re trying to say:

local uis = game:GetService("UserInputService")
local movekeys = "WASD"
uis.InputBegan:Connect(function(input, process)
	if not process then return end
	if input.KeyCode and movekeys:match(input.KeyCode.Name) then
		task.wait(5)
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 500
	end
end)

A walkspeed of 500 is way to fast, and setting the walkspeed when the character starts walking is redundant, as you can just set the walkspeed before anything happens. @NoraaApple wants to be able to bring the character to a slow stop, instead of an instant stop, when they stop pressing a key to move. So setting the walkspeed is not going to work here.

1 Like

I think that was a bait comment, its pretty obvious waiting 5 second then putting your walkspeed to some really high number isnt going to get OP the results he wanted

1 Like

What does that mean? I’m assuming just a reply that is spam or off-topic?

Basically he did it because he knew someone would call him out for it, therefore baiting you

Well he is new to the devforum, so it’s not that serious.
edit: English is not his first language.

1 Like

I actually have a simple walk to build speed similar to evade with decreasing speed as you stop walking too. It’s homemade also.

-- SERVERSCRIPT
game:GetService("Players").PlayerAdded:Connect(function(__PLR)
   local __FOLDER = Instance.new("Folder")
   __FOLDER.Name = __PLR.Name
   __FOLDER.Parent = game:GetService("ReplicatedStorage")
   local __SPEED = Instance.new("NumberValue")
   __SPEED.Name = "__SPRINTSPEED"
   __SPEED.Value = 25 -- Change your sprint speed here
   __SPEED.Parent = __FOLDER
   local __ISSPRINT = Instance.new("BoolValue")
   __ISSPRINT.Name = "__SPRINTING"
   __ISSPRINT.Parent = game:GetService("ReplicatedStorage")
end)
--LOCALSCRIPT
local UIS = game:GetService("UserInputService") 
local TS = game:GetService("TweenService") 
local plr = game.Players.LocalPlayer
local Humanoid = script.Parent:FindFirstChildOfClass("Humanoid")
local Anim = Humanoid:LoadAnimation(game.ReplicatedStorage.sprint)
local Camera = workspace.CurrentCamera
local debounce = false
local Sprinting = game:GetService("ReplicatedStorage"):FindFirstChild(plr.Name):FindFirstChild("__SPRINTING")
local Sprint
Humanoid.Running:Connect(function(speed)
	local SpeedTween = TS:Create(Camera, TweenInfo.new(3), {FieldOfView = 110})
	local WalkTween = TS:Create(Camera, TweenInfo.new(2), {FieldOfView = 70})
	Sprint = TS:Create(plr.Character.Humanoid, TweenInfo.new(3), {WalkSpeed = game:GetService("ReplicatedStorage"):FindFirstChild(plr.Name):FindFirstChild("__SPRINTSPEED").Value})
	if speed > 8  then
		if debounce == false then
			debounce = true
			Sprint:Play()
			Sprinting.Value = true
			SpeedTween:Play()
		Anim:AdjustSpeed(0.8)
			Anim:Play()
			Sprint.Completed:Connect(function()
				Anim:AdjustSpeed(1.3)
			end)
		end
	elseif speed <= 8 and not (Humanoid.WalkSpeed == 0) then
		debounce = false
		Anim:Stop()
		TS:Create(plr.Character.Humanoid, TweenInfo.new(1), {WalkSpeed = 16}):Play()
		Sprinting.Value = false
		WalkTween:Play()
	end
end)

The problem with is, You can’t overrwrite default walkspeed on humanoid, instead you have to change __SPRINTSPEED Value instead.
Though i recommend anchoring humanoidrootpart to “stun” the player if you wanna.

3 Likes

I haven’t played the game ‘Evade’, could you send a video of what this movement looks like?

1 Like

It’s honestly really simple, all it looks like is just smooth speeding up then smoothly slowing down

You just walk to build speed, then slowly decrease after you stop moving, i managed to replicate it as an alternative for shift to sprint.

Totally not excuse because i gave up on making shift to sprint for mobile.

1 Like

If you need help with this, such as, make it so the player doesnt sprint or change the sprint value then change it back after a while, let me know.

1 Like

I’m so sorry for the delayed responses guys, I was busy with school. I will try this.

1 Like

Hey, I am terribly sorry for the late response. School and stuff :frowning:
If you could, can you send a code example for me and if you can a better explaination.

2 Likes

It’s called pseudo-code, and it’s supposed to give a basic representation of how you can achieve the desired effect.

sorry i dont know how to use devforum

1 Like

jdoodle.lua (2.5 KB)
this is not mine, i just modify it

(put it in stater character script)