Script not working, but no errors

  1. What do you want to achieve? I want to make a custom animations script.

  2. What is the issue? The script isn’t working, but the output isn’t giving me errors.
    This is my script

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		Character.Animate.jump.JumpAnim.AnimationId = "rbxassetid://6102392776"
	end)
end)
  1. What solutions have you tried so far? I tried rbxassetid://, I tried http://www.roblox.com/asset/?id=
    and I tried just my animation id

Is Character.Animate.jump.JumpAnim.AnimationId being set to your new AssetId properly, or is that the problem.

1 Like

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)
1 Like

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)
1 Like