I'm just trying to make a spell based on an anime, but right now I'm just trying to get the animation to work, but it's not. Someone, please help!!
Local Script
local UIS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local rArm = {ruArm = char:WaitForChild("RightUpperArm"), rlArm = char:WaitForChild("RightLowerArm"), rHand = char:WaitForChild("RightHand")}
local human = char:WaitForChild("Humanoid")
--Animation
local animInstance = Instance.new("Animation")
animInstance.AnimationId = "rbxassetid://4702042203"
local pistolAnim = human:LoadAnimation(animInstance)
UIS.InputBegan:Connect(function(key, processed)
if processed then return end
if key.UserInputType == Enum.UserInputType.Keyboard then
if key.UserInputType == Enum.KeyCode.E then
if UIS:IsKeyDown(Enum.KeyCode.E) then
pistolAnim:Play()
end
end
end
end)

1 comment
Best bet is that you either didn't preload it, or the required joints in the animation aren't apparent.