Trying to make a tutorial for my obby

I want to make a tutorial for my obby… so I want to record my movements then in the game I just play the movements and the npc will complete the obby… but there are several problems such as I can’t save the movement in the datastore and can’t play the movement on my npc ( I used the button to trigger it )

or is there another way to make it?

7 Likes

Just make an animation of the movement

3 Likes

but it will take a lot of time

pathfinding?
you can pathfind your character to a certain waypoint if possible
what type of obby is it?

1 Like

likee tower but easier version…
I’ve tried using pathfinding humanoid:moveto but its local and theres no walk and jump animation (r6)

isn’t the npc doing what you want already? what is your solution?

The walking and jumping animations dont work

you have to manually detect the humanoid GetState() and then play the corresponding animations

1 Like

is it possible on the local side?

i think if you spawn the npc locally, the client is the owner and have full control

I’ve spawned it locally, then what is the code to run the animation?

if you make an npc in the studio using the avatar tools. there should be a script “Animate” or something like that. it is the default template you can use.
But basically, it setup some animation id, get Humanoid Animator, LoadAnimation to get the AnimationTrack. then you can play those tracks

so I have to play it manually?

hook to Humanoid StateChanged event, then play your animations based on the new state

can you give an example of the code?

I added the animation manually from the script

1 Like

forget it… turns out I just had to change the animate to localscript

1 Like

depends on the setup, if the Animate script is on the npc, and you spawned the npc locally. change Animate script context to “Client”

because “Client” script would also run in non workspace, add a check on top of the script
if not script:IsDescendantOf(workspace) then return end

yeah thanks it work… but I have to create pathfinding manually