Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Humanoid Double Jump is not working?

Messing around with scripts and such, I was trying to make a double jump script ( LocalScript Parent is Folder, Folder Parent is Workspace ) i've also tried putting the LocalScript in StarterPlayer.StarterPlayerScripts but still the same issue

Here is the LocalScript:

-----------Variables-------------

local player = game.Players.LocalPlayer
local character = player.Character
local Humanoid = character:WaitForChild("Humanoid")
local oldJumpPower
local CanDoubleJump = false
local  Mult = 2
local Cooldown = 0.2
local DoubleJumped = false
-------------------------------------

function DoubleJumpRequest()
	if not character or not Humanoid or not player then
		return
		end
	if CanDoubleJump and not DoubleJumped then
		CanDoubleJump = true
		Humanoid.JumpPower = oldJumpPower * Mult
		Humanoid.ChangeStats(Enum.HumanoidStateType.Jumping)
	end
end

Humanoid.StateChanged:Connect(function(new)
	if new == Enum.HumanoidStateType.Landed then
		CanDoubleJump = false
		DoubleJumped = true
		wait(Cooldown)
		DoubleJumped = false
	end
	
	
	end)

The Output Says nothing, Could you help me fix this??? I'm so confused me potato brain :P

3 comments

0

You can't run a LocalScript in server(in this case WorkSpace).

0

i've tried doing that but still the same issue

0

Uh is oldJumpPower nil. Because you just do local oldJumpPower so the oldJumpPower don't have any value.

1 answer

I think your supposed to do something like humanoid jump active then disable then active then disable. I am not sure about double jumps but that is the way I would start off. Also, I think it should not be a local script.

1 comment

0

Yeah probably... I'll try it

This discussion is preserved as it was. New answers, comments, and votes are closed.