I’ve checked out the animation documentation and copied it exactly but no animation plays. Here’s my code:
local CAS = game:GetService("ContextActionService")
local debris = game:GetService("Debris")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local rollAnimation = Instance.new("Animation")
rollAnimation.AnimationId = "rbxassetid://15900397804"
local rollAnimationTrack = animator:LoadAnimation(rollAnimation)
local function Roll(actionName, inputState, _inputObject)
if inputState == Enum.UserInputState.End or inputState == Enum.UserInputState.Cancel then return end
rollAnimationTrack:Play()
print("Animation Played")
end
CAS:BindAction("roll", Roll, false, Enum.KeyCode.Q)
The print statement runs fine.