You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Make a NPC walk, with the animation.
(I got the npc from testing a game in roblox studio then copying/pasting it into the studio) -
What is the issue? I can’t get the animation to stop
--heres a snippet of code from a module placed in replicated storage
local module = {}
function module:WalkToPart(character,part,anim)
local hrp = character:FindFirstChild("HumanoidRootPart")
if not character:FindFirstChild("HumanoidRootPart") then return end
if not anim:IsA("Animation") then return end
local Animation = character.Humanoid:LoadAnimation(anim)
Animation:Play()
character.Humanoid.WalkToPoint = part.Position
end
return module
-- with a walk animation placed inside
local m = require(game.ReplicatedStorage.Animate)
m:WalkToPart(script.Parent,workspace.Part,script.WalkAnim)
I thought character.Humanoid.WalkToPoint = part.Position
would yield the script but It didn’t.