ditaxjd
(Ditz)
January 20, 2025, 4:38am
#1
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
talis783
(Repliz)
January 20, 2025, 5:30am
#2
Just make an animation of the movement
3 Likes
ditaxjd
(Ditz)
January 20, 2025, 9:17am
#3
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
ditaxjd
(Ditz)
January 20, 2025, 10:58am
#5
likee tower but easier version…
I’ve tried using pathfinding humanoid:moveto but its local and theres no walk and jump animation (r6)
EtNowis
(EtNowis)
January 20, 2025, 11:09am
#7
isn’t the npc doing what you want already? what is your solution?
ditaxjd
(Ditz)
January 20, 2025, 11:10am
#8
The walking and jumping animations dont work
EtNowis
(EtNowis)
January 20, 2025, 11:13am
#9
you have to manually detect the humanoid GetState() and then play the corresponding animations
1 Like
ditaxjd
(Ditz)
January 20, 2025, 11:14am
#10
is it possible on the local side?
EtNowis
(EtNowis)
January 20, 2025, 11:16am
#11
i think if you spawn the npc locally, the client is the owner and have full control
ditaxjd
(Ditz)
January 20, 2025, 11:17am
#12
I’ve spawned it locally, then what is the code to run the animation?
EtNowis
(EtNowis)
January 20, 2025, 11:21am
#13
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
ditaxjd
(Ditz)
January 20, 2025, 11:24am
#14
so I have to play it manually?
EtNowis
(EtNowis)
January 20, 2025, 11:26am
#15
hook to Humanoid StateChanged event, then play your animations based on the new state
ditaxjd
(Ditz)
January 20, 2025, 11:33am
#16
can you give an example of the code?
ditaxjd
(Ditz)
January 20, 2025, 11:52am
#17
I added the animation manually from the script
1 Like
ditaxjd
(Ditz)
January 20, 2025, 11:59am
#18
forget it… turns out I just had to change the animate to localscript
1 Like
EtNowis
(EtNowis)
January 20, 2025, 12:02pm
#19
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
ditaxjd
(Ditz)
January 20, 2025, 12:05pm
#20
yeah thanks it work… but I have to create pathfinding manually