#Script not letting npc do animation

140 messages · Page 1 of 1 (latest)

frail ibex
#

Unsure on the fix, i have made and published an animation and entered the ID though it may not be fully visible on the screenshot

frail ibex
#

nope just myself

quick nymph
#

hm

#

if thats not it

frail ibex
#

i have no clue what im really doing, i made an animation and thought "lemme try it ingame"

quick nymph
#

maybe it the animation it self

#

does the animation have movement?

#

@frail ibex

frail ibex
#

yes

#

its like a little dance

quick nymph
#

no like

#

does it move

#

example you point b

#

to point a

frail ibex
#

yes? why would it not its an animation

merry gorgeBOT
#

studio** You are now Level 1! **studio

quick nymph
#

like the position

frail ibex
#

i can send a short clip if thatll help

quick nymph
#

alright

#

send

frail ibex
quick nymph
#

the problem here is probably because it doesnt repeat

frail ibex
#

i dont follow

quick nymph
#

spawn

frail ibex
#

yes

quick nymph
#

uh

#

then idk

frail ibex
#

if i use the run option instead where its the camera it still doesnt do it

quick nymph
#

if you mind what game are u making

#

hmm then idk

frail ibex
#

i dont know what game i want to exactly do yet, i wanted to play around with some things tonight though

quick nymph
#

oh

#

alright

#

bye!

frail ibex
#

?

#

wha

quick nymph
#

i dont know

#

what to do

frail ibex
#

i guess a fighting game if that helps thatd probably be inline with what id want

quick nymph
#

alright

frail ibex
#

is that helpful to you?

graceful dust
#

set animation.Parent to Humanoid

frail ibex
#

one second lemme try that

graceful dust
frail ibex
#

im not exactly sure what any of that means in all honesty i dont mean to be rude i just have no clue what you mean by putting an animation folder in the humanoid

graceful dust
frail ibex
#

the animation is in my rig i believe

graceful dust
# frail ibex

Yeah you can load it.
Do

local anim = script.Animation
local animator = script.Parent.Humanoid.Animator
local track = animator:LoadAnimation(anim)
track:Play()
frail ibex
#

copy pasted that and hes not doing the animation

merry gorgeBOT
#

studio** You are now Level 2! **studio

graceful dust
frail ibex
#

WAIT HE DOES DO IT

#

OK HES DOING IT

noble lichen
#

I mean you have to wait until the character loads that could be the reason

merry gorgeBOT
#

studio** You are now Level 5! **studio

frail ibex
#

without the delay he would just stand their

noble lichen
#

yeah thats what im saying

graceful dust
#

Pretty sure when he was loading the game loaded faster

noble lichen
#

how could the game load faster than a model that its in the game 😮

graceful dust
#

you tell that

frail ibex
#

is their a way to loop the animation in code?

graceful dust
#

track.Looped = true

noble lichen
#

yeah animation.Looped = true

frail ibex
#

and what line would that go on?

graceful dust
#

beginning

#

but below the track

graceful dust
#
local anim = script.Animation
local animator = script.Parent.Humanoid.Animator
local track = animator:LoadAnimation(anim)
track.Looped = true
task.wait(4)
track:Play()
frail ibex
#

it only does the 1 with that

graceful dust
frail ibex
#

ye it only does it once for some reason

frail ibex
#

yep copy pasted that

#

i can screenshare or record it if needed

graceful dust
frail ibex
#

through a recording or screenshare

graceful dust
#

recording

frail ibex
#

one moment

graceful dust
#

also, please use Gyazo lmfao instead of screen recording from a phone

#

or Medal / Geforce experience

frail ibex
#

i left 4 second space after the emote to see if it looped the wait line to and it still didnt

#

i just ran it without the task wait line and it wouldnt do it at all

graceful dust
frail ibex
#

no...

#

that might help wouldnt it

#

how do i publish it as a loop if you know

graceful dust
frail ibex
#

wait so that just has to be toggled on when i publish

graceful dust
#

toggle looping animation yes that and publish it

frail ibex
#

so, when i inserted the looped version ID, it yet again didnt play or loop, HOWEVER with the task.wait command it did forever loop

merry gorgeBOT
#

studio** You are now Level 3! **studio

frail ibex
#

so i do need the time to start it on it

#

that should be fixed now, Thank you so much for the help, if i can ask one more question however would i input the same code to make the player do the animation instead of the npc

#

nvm it did work

graceful dust
frail ibex
#

is that in a local script or normal script

#

ill use that instead to be on the safe side, dont want spaghetti coding lmao

#

that doesnt seem to work on either local or normal script

graceful dust
#

serverscriptservice

#

can't get spoofed because its on server

frail ibex
#

where is that?

#

wait nvm

#

im blind

#

and thats a normal script inserted into serverscriptservice correct?

graceful dust
#

modulescript (client and server (this is only for data)) (the colour of this script is purple)
localscript (client only - client PC viewable, ignored by engine if in server instances.) (the colour is blue.)
serverscript (access to all data in server, instances, and stuff, the brain of the game.) (colour is white.)

frail ibex
#

ok im following

#

when i go to insert a script to further insert the script youve given me i dont see a server script

graceful dust
#

that means its a Script

#

in terms of short

frail ibex
#

OH right ok i get it now, sorry

#

that doesnt seem to do it ;_;

#

thats the full thing their, i added the animation and ID like before to it aswell

graceful dust
#

between animation and game.Players

#

Format it

frail ibex
#

so the game.Players part is on line 2 then

graceful dust
#

also

frail ibex
#

it didnt do it still

graceful dust
frail ibex
#

pardon?

graceful dust
# frail ibex

same as this you see this pill animation put it in that script

frail ibex
#

Oh so copy intro dance to the serverscript

merry gorgeBOT
#

studio** You are now Level 4! **studio

frail ibex
#

still didnt work