You can learn more about this here, but I will write a solution that will hopefully work.
Excuse the bad formatting;
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local humanoid = Character:WaitForChild("Humanoid")
for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
playingTracks:Stop(0)
end
Character.Animate.jump.JumpAnim.AnimationId = "rbxassetid://6102392776"
end)
end)
you are listening for when the character is added so maybe the character is already added
local function CharacterAdded(character)
-- Character added stuff
end
local function PlayerAdded(player)
local playerCharacter = player.Character or player.CharacterAdded:Wait()
CharacterAdded(playerCharacter)
player.CharacterAdded:Connect(CharacterAdded)
end
for _, player in ipairs(game:GetService('Players'):GetPlayers()) do
PlayerAdded(player)
end
game:GetService('Players').PlayerAdded:Connect(PlayerAdded)