Hello, I need help
Who can tell me how to make an NPC do an animation(Loop)
Example
Thank u
Sorry if some things don’t make sense I used a translator
Hello, I need help
Who can tell me how to make an NPC do an animation(Loop)
Example
pretty sure the animation needs to be set to action? also put it looped of course well uh im not the best scripter so not really sure what i can say more.
Yes,But i need a script no?
Yes you do need a script to make it work that’s for sure.
Does some one kwo wat script xD
Perhaps this might help you, https://www.youtube.com/watch?v=tkrbmFFBvOQ. (Unfortunately that video is outdated now, but there’s more videos about it)
First, you’ll need to make sure the animation has the loop setting checked in the animation editor. To make the NPC play the animation, you’ll want to put a script inside the NPC and type something like this inside the script:
local AnimationObject = Instance.new("Animation")
AnimationObject.Parent = script.Parent
AnimationObject.AnimationID = “http://www.roblox.com/asset/?id=animationidhere”
local Animation = script.Parent.Humanoid:LoadAnimation(script.Parent.Animation)
Animation:Play()
Hopefully this helps. If you have any questions feel free to ask
Try doing this:
local AnimationId = --//Put in the id here
local Animation = Instance.new("Animation")
Animation.AnimationId = ("rbxassetid://%d"):format(AnimationId)
local AnimationTrack = script.Parent.Humanoid:LoadAnimation(Animation)
AnimationTrack.Looped = true
AnimationTrack:Play()
My bad, try this instead:
AnimationObject.AnimationID = “http://www.roblox.com/asset/?id=animationidhere”
actually ty it worked
Thanks All for helping me!
No problem, just happy to help.
Not trying to be pushy, but can you give the person who fixed the problem a solution by clicking the solution button under their reply?
I alredy do it lol
Ok, thank you!
I’ve been trying to collect those solutions.
Np!
Cya
a little late to the convo here, but where would I put this script? HumanoidRoot, the literal NPC group itself, or anywhere else? Also, Is it a normal script or local? Thank you!