Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my character not using my jump and fall animation?

Asked by 3 years ago
Edited 3 years ago

basically. whenever my Roblox character jumps he stands still flat and when he lands he plays the idle animation and everything else but for some reason, the jump animation is bugged I wish I could post some pictures but I can't.

edit: I FORGOT TO SAY MY FALL ANIMATION won't WORK EITHER

another edit: just saying I used the animate local script Roblox automatically puts in your character

0
One question: is it your animation LIKE you uploaded it to roblox. DayLighter_1995 8 — 3y
0
yes it is AllenBatman666 30 — 3y
0
Make sure the animation is in r50 and you game is in the same. There might be a animation script that doesnt have a animation id in the script. cancle5 120 — 3y
0
what is r50? AllenBatman666 30 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Since you're making this a jump animation, check the Y velocity to ensure that it works at the right moment, you could also do this with the Jump state on the Humanoid but I usually use velocity on a LocalScript because it's more precise.

Keep in mind, I made this script while not on studio so I might've made a mistake but this should be enough information to tell you how to do it.

-- This was created as a LocalScript in StarterCharacterScripts

local LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid") or Character:WaitForChild("Humanoid")

local RootPart = Humanoid.RootPart
local Animation = Instance.new("Animation")
Animation.AnimationId = string.format("rbxassetid://%s", 0) -- Your AnimationId goes here.
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack.AnimationPriority = Enum.AnimationPriority.Core
AnimationTrack.Looped = false

game:GetService("RunService").Stepped:Connect(function()
    if RootPart.Velocity.Y > 28 then
        if AnimationTrack.IsPlaying == false then
            AnimationTrack:Play()
        end
    else
        AnimationTrack:Stop()
    end
end)
0
yeah your script wont work. pretty weird bug i have AllenBatman666 30 — 3y
Ad

Answer this question