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

Animation not loading and not printing any error?

Asked by 4 years ago
local Animations = {
    "rbxassetid://4049646104",
    "rbxassetid://4272484885",
    "rbxassetid://4212499637",
    "rbxassetid://3762641826",
    "rbxassetid://3716636630",
    "rbxassetid://4391208058",
    }
    TargetedCharacter.Humanoid.WalkSpeed = 0
    TargetedCharacter.Humanoid.JumpPower = 0
    TargetedCharacter.HumanoidRootPart.Anchored = true
    local random = math.random(1,#Animations)
    local ID = Animations[random]
    local Animation = Instance.new("Animation",TargetedCharacter)
    Animation.AnimationId = ID
    local AnimationTrack = TargetedCharacter.Humanoid:LoadAnimation(Animation)
    AnimationTrack.Looped = true
    AnimationTrack:Play()

The only thing I want is to make sure the animation plays but for some reason it will not.

1 answer

Log in to vote
0
Answered by 4 years ago

Solved the problem, I used emotes in this situation and had to use InsertService to get the correct id.

Ad

Answer this question