I use this script to start an animation on someone
AnimationId = "ID" local Anim = Instance.new("Animation") Anim.AnimationId = "rbxassetid://"..AnimationId local k = Workspace.Dummy.Humanoid:LoadAnimation(Anim) k:Play()
and this one to copy the animation
local Services = {PLS = game:GetService("Players")} local Player = Services.PLS.LocalPlayer local Mouse = Player:GetMouse() local Psj = Player.Character Mouse.Button1Down:Connect(function() local A = Mouse.Target.Parent or Mouse.Target.Parent if Services.PLS:GetPlayerFromCharacter(A) then local Ani = A:FindFirstChild("Humanoid"):GetPlayingAnimationTracks() local ANIL = Psj:WaitForChild("Humanoid"):LoadAnimation(Ani) ANIL:Play() ANIL.TimePosition = Ani.TimePosition end end)
someone could help me fix it
Hey man, it looks like you are trying to use 'Ani' like it is a singular AnimationTrack; However, :GetPlayingAnimationTracks() actually returns a list of all playing animation tracks.
You would have to iterate through the returned list and find the track you want to copy.
for i, track in pairs(Ani) do -- do what you need to do here end