Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to load myself as NPC - but with a twist!?

Asked by 6 years ago

I need to load myself as an NPC. However, I already know the basic:

1.) Click Play. 2.) Open Explorer > Workplace > Copy "The_Jetcraft". 3.) Click Stop. 4.) Paste.

But that loads a straight standing, no animation npc. What I want is my frozen idle animation inserted into the NPC (My animation is cartoony, I want that, "Hey whaddup bro!" look).

So basically I want my NPC In-Game to look like this ALL the time, unmoving, compeletly FROZEN:

https://imgur.com/a/Qtb01

Thanks,

Jet

0
Anchor it. It freezes all aminations. hiimgoodpack 2009 — 6y
0
... The_Jetcraft 7 — 6y
0
But how do I get the animation in the first place!? The_Jetcraft 7 — 6y

2 answers

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
6 years ago

You can use the LoadAnimation function on the Humanoid object of the NPC you wish to animate.

Use the Play function to play the animation.

local anim = Instance.new("Animation") --Create the anim object
anim.AnimationId = "rbxassetid://" --Put your anim's ID here

local human = script.Parent --This is the Humanoid object
local track = human:LoadAnimation(anim) --Load the anim on the humanoid
track:Play() --Play the anim
0
this doesn't seem to create an animation object inside the character, neither does it work. Thank you for the script though. The_Jetcraft 7 — 6y
0
No one said it would create an animation object. hiimgoodpack 2009 — 6y
Ad
Log in to vote
1
Answered by 6 years ago

Ok, there is one problem with your logic... Frozen animation? Then it isn't an animation at all. Goulstems code does work, but it PLAYS the animation. Goulstem simply misunderstood your query. As far as I know, you cant freeze an animation. You have to rotate the part manually to that position you want in studio, like almost everyone does.

0
:/ I tried Ghoulstem's code out and it didn't work period, but anyway... The_Jetcraft 7 — 6y

Answer this question