i made a test animation script inside of startercharacterscripts and the animation only works on a rig but not my character.
local Players = game:GetService("Players")
-- Variables
local player = Players.LocalPlayer
local animation1 = game.ReplicatedStorage.fightidle
local rig = workspace.Rig
print(animation1)
-- Animation
if player.Character then
local animator = player.Character.Humanoid.Animator
local animationTrack:AnimationTrack = animator:LoadAnimation(animation1)
animationTrack:Play()
rig.Humanoid.Animator:LoadAnimation(animation1):Play()
animationTrack.DidLoop:Connect(function()
print("looped")
end)
end