function OnTouch(hit) game.Players.LocalPlayer.Character.Anima.run.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=4958225000" end script.Parent.Touched:connect(OnTouch)
Error: error: Workspace.Knight.Button.Animation:2: attempt to index nil with 'Character' (I asked the discord, I wanted to see if I can get a different answer here too)
(This might not be fitting specifically for your case but this is some issues I saw)
First off, you're not checking if the thing that touched the part is even a character, so it might touch a random workspace object and attempt to find the "character" of that...
Second off, you don't need to do that long path to the character, you can just get the part's parent (after you've confirmed it is indeed a character)
function OnTouch(hit) local humanoid = hit:FindFirstChild("Humanoid") if humanoid then hit.Parent:WaitForChild("Anima").run.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=4958225000" end end script.Parent.Touched:Connect(OnTouch)
(also using :Connect instead of :connect is recommended)