local function Velocity(root, spd, height)
if root and root.Parent then
local bd = Instance.new("BodyVelocity")
bd.Parent = root
bd.MaxForce = Vector3.new(9000, 9000, 9000)
bd.Velocity = root.CFrame.LookVector * spd + Vector3.new(0, height, 0)
task.delay(0.1, function()
if bd.Parent then
bd:Destroy()
end
end)
end
end
local function onLanded(root)
if JumpCount[root] then
JumpCount[root] = 0
end
end
function module.doubleJump(root, height, MaximumJump, CD)
local hum = root.Parent:FindFirstChild("Humanoid")
if not hum then return end
JumpCount[root] = JumpCount[root] or 0
GlobalCd[root] = GlobalCd[root] or false
if not GlobalCd[root] and JumpCount[root] < MaximumJump then
JumpCount[root] += 1
if AnimationHandler then
AnimationHandler.StartAnimations("DoubleJump", hum)
end
root.Velocity = Vector3.new(root.Velocity.X, height, root.Velocity.Z)
GlobalCd[root] = true
task.delay(CD, function()
GlobalCd[root] = false
end)
else
if JumpCount[root] >= MaximumJump then
end
end
end
local function setupLandingDetection(character)
local humanoid = character:FindFirstChild("Humanoid")
local root = character:FindFirstChild("HumanoidRootPart")
if humanoid and root then
humanoid.StateChanged:Connect(function(_, newState)
if newState == Enum.HumanoidStateType.Landed then
onLanded(root)
end
end)
end
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
setupLandingDetection(character)
end)
end)
return module
#Dobule Jump dont Resetting when hum State change to landed
15 messages · Page 1 of 1 (latest)
because I dont have nitro I had to remove the top part and all of the warnings/print messages
let me know if this works I'm not actually sure if it will I apologize
okk
dont worry
np dont work
still doesnt work?
any error messages?
if JumpCount[root] >= MaximumJump then
end
Remember to finish this part.
i dont need to finish it