So what I've done is a script that checks when the player is jumping , and if he is then add more walkSpeed, but if he stops jumping and starts walking again set it back to the original WalkSpeed. Everything is working as intended just that when I reach the max WalkSpeed, stop, and jump again it instantly rises to the max instead of doing it slowly, as intended. Here is the code:
Humanoid = script.Parent.Humanoid while true do Humanoid.StateChanged:Connect(function(old , new) if new == Enum.HumanoidStateType.Running then Humanoid.WalkSpeed = 17 --Player is running^ elseif new == Enum.HumanoidStateType.Jumping then Humanoid.WalkSpeed = Humanoid.WalkSpeed + 0.05 --Player has jumped^ end if Humanoid.WalkSpeed >= 50 then Humanoid.WalkSpeed = 50 end end) wait() end
Put this in a local function so we can use player:
local function answer(player) if player.Character.Humanoid.Jump == true then player.Character.WalkSpeed = player.Character.WalkSpeed + 1 -- Add 1 walkspeed per jump end end
your welcome
ps. if this does not work well i didnt test this script :P
This does not do your function, but close!