my goal was to create a code that would allow a player to double jump, but it didnt end up working. Any ideas? THANKS.
while workspace.Gamestart == true do
local FirstJump = false
local MidJump = false
local Mouse = script.Parent.Parent:GetMouse()
function onKeyDown(key)
if string.byte(key) == 32 and FirstJump == true and (MidJump == false or script.Creative.Value == true) then
MidJump = true
script.Parent.Parent.Character.Torso.Velocity = Vector3.new(0,50,0)
end
end
function Update()
if script.Parent.Parent.Character.Humanoid.Jump == true then
FirstJump = true
else
FirstJump = false
MidJump = false
end
end
Mouse.KeyDown:connect(onKeyDown)
script.Parent.Parent.Character.Humanoid.Changed:connect(Update)
end

2 comments
Any Output errors?
No