Oh well heres the code Ill fix the video in a sec:
module.abilites['DoubleJump'] = function(player:Player,jump)
-- instances-------------------------------------------------------------
-- player
local char = player.Character
-- instances
local root = char.PrimaryPart
local rootAttach = root:FindFirstChild('RootAttachment')
local hum = char:FindFirstChildOfClass('Humanoid')
local animator = require(hum:FindFirstChild('AnimationHandler'))
print(animator.getAnims())
local dbAnim:AnimationTrack = animator:GetAnimation('DB1') or animator.getAnims()['DB1'] -- get anim
local foreceMulti = 1
local downwardsForce = 1
local forwardSpeed = -50
if jump > 1 then
foreceMulti = 1 + (jump / 2)
end
-- attachments
local RLA
local RLA2
local LLA
local LLA2
if hum.RigType == Enum.HumanoidRigType.R15 then
RLA = char:FindFirstChild('Left Foot'):FindFirstChild('RLA')
LLA = char:FindFirstChild('Left Foot'):FindFirstChild('LLA')
elseif hum.RigType == Enum.HumanoidRigType.R6 then
RLA = char:FindFirstChild('Right Leg'):FindFirstChild('RLA')
LLA = char:FindFirstChild('Left Leg'):FindFirstChild('LLA')
end
RLA2 = RLA.Parent:FindFirstChild('RLA2')
LLA2 = LLA.Parent:FindFirstChild('LLA2')
-- set values of hum
hum.WalkSpeed = 0
-- double jump
print(RLA,RLA2)
EffectEvent:FireServer('Create','DBJTrail',trails:FindFirstChild('BlueElectricTrail'),RLA.Parent ,RLA,RLA2)
EffectEvent:FireServer('Create','DBJTrail',trails:FindFirstChild('BlueElectricTrail'),LLA.Parent ,LLA,LLA2)
local velocity:LinearVelocity
if root:FindFirstChildOfClass('LinearVelocity') then
root:FindFirstChildOfClass('LinearVelocity'):Destroy()
end
velocity = Instance.new('LinearVelocity')
velocity.Attachment0 = rootAttach
velocity.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
velocity.MaxForce = math.huge
velocity.VectorVelocity = Vector3.new(0,50,forwardSpeed * foreceMulti)
velocity.Parent = root
dbAnim:Play() -- play animation
wait(0.5)
repeat
velocity.VectorVelocity -= Vector3.new(0,10 * downwardsForce,0)
downwardsForce += 0.1
task.wait(0.1)
until velocity.VectorVelocity.Y <= -65
repeat
task.wait()
until hum.FloorMaterial.Name ~= 'Air'
velocity:Destroy()
-- remove effects
EffectEvent:FireServer('Delete','DBJTrail',trails:FindFirstChild('BlueElectricTrail'),RLA.Parent)
EffectEvent:FireServer('Delete','DBJTrail',trails:FindFirstChild('BlueElectricTrail'),LLA.Parent)
return
end
This is all the code.
This is the code of me getting the animation:
module.GetAnimation = function(Name)
print(animations)
if Name then
local anim = animations[Name]
if anim then
warn(anim)
return anim
else
warn('NO ANIMATION FOUND.',anim)
return
end
else
warn('NO NAME PROVIDED.')
return
end
end
Uh well when the animation makes you go upside down it kinda cuts off and resumes in another position, if you look at the videos (which should work now) you can see
Your welcome I had this problem my self in the past and I figured out on how to fix it by adding more keyframes, also it appears this bug happens if you activate channels.