Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My tool can't play R15 animations. What happened?

My tool is unable to play a R15 animation properly.

char = game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)
humanoid = char:WaitForChild("Humanoid")
print("Found!")

  
anim = Instance.new("Animation", script.Parent)
anim.AnimationId = "rbxassetid://3099747122"
anim.Name = "toolanim"
anim.Archivable = true

  
track = humanoid:LoadAnimation(anim)

  
script.Parent.Activated:Connect(function(turn)
game.ReplicatedStorage.AddBagels:FireServer(math.random(1,5))
print(track)
track:Play()
end)

1 answer

  1. Did you insert a handle?
  2. Make sure the animation is in the handle.
  3. If it is a hopperbin that is deprecated.

Instead of the piece of code you put use this:

`local character = game.Players.Local.Character local humanoid = character.Humanoid local handle = script.Parent.Handle

if humanoid then print('Found') else error('Error 404, the variable humanoid is not found.')

local anim = handle:WaitForChild("Animation") --Note: Make sure it's still named animation, if not it will break.

local track = humanoid:LoadAnimation(anim)

--Add the other piece of code below the comment.

track:Play()`

I haven't actually tested it, and plus i'm new to roblox development I only started a few months ago.

This discussion is preserved as it was. New answers, comments, and votes are closed.