I want to make jumping system off walls, you can also run vertically on them and jump off too
After jump, animation with looped flipping LowerTorso starts playing, and if player was wallrunning upwards, the TimePosition of the animation changes to time where character turned to 180 degrees.
The problem I encountered was that Character changes CFrame BEFORE animation starts playing, even animation fadeTime is set to 0
I tried to put lines about animation before lines about PivotTo function, but it’s still the same
print("oop") -- prints at the start when function calls
CurrentFlipAnimation1 = Animations.FrontFlip
CurrentFlipAnimation2 = Animations.Flips[math.random(#Animations.Flips)]
if DoFlip then
local Speed = 1
local LookRaycast = workspace:Raycast(JumpCFrame.Position,JumpCFrame.LookVector * 20,WallParams)
if LookRaycast and ImpulseType ~= 2 then
--Speed = 10/((LookRaycast.Distance^2)/10)
Speed = 3.5 - LookRaycast.Distance/8
end
--CurrentFlipAnimation1:Play(0.05,1,Speed * (InvertFlip and -1 or 1))
CurrentFlipAnimation1:Play(WallRunUp and 0 or 0.05,1,0)
if WallRunUp then -- checks if player was running upwards
print("a!")
CurrentFlipAnimation1.TimePosition = 12/24
end
CurrentFlipAnimation2:Play(0.04,0,1)
end
local JumpCFrame = CFrame.new(HumanoidRootPart.Position)*WallStickCFrame.Rotation
Character:PivotTo(JumpCFrame * CFrame.Angles(0,(InvertFlip and DoFlip or ImpulseType == 2) and 0 or 0,0))
-- 0 or 0 because here I tested if it's really pivotTo starts before animation
This part of code triggers by UserInputService.JumpRequest signal
mb JumpRequest function triggers after Animation render and before SImulation render?


