Cant change animation

so im trying to make a very basic code where the Jump animation changes depending on whether the player is moving or not, and from my scripting knowledge (which is almost nothing) this SHOULD work, but it doesnt!

if character.PrimaryPart.Velocity.Magnitude == 0 then
	JumpAnimation.AnimationId = "rbxassetid://12965649597"
else
	JumpAnimation.AnimationId = "rbxassetid://12907804068"
end

maybe the issue is obvious, but i have just started scripting, and the output doesnt say anything

Try these 3 lines in place of your 1 line…

local jumpAnimation = “rbxassetid://12965649597”
local animateScript = character:WaitForChild(“Animate”)
animateScript.jump.JumpAnim.AnimationId = jumpAnimation

doesnt work, error said “expected ‘(’, ‘{’ or string when parsing function call, got ‘/’”