#Help with animation script

1 messages · Page 1 of 1 (latest)

crystal gate
#

1- im struggling to fit my animations into the game i watched many toturials and used ai but with no results . i just need someone to teach me how or tell me where can the problem to be
2 - payment arround 20-50robux

lean wind
#

yo

#

what do u need?

#

to put animaiton in game?

#

which animation is it

old nacelle
#

You need an animation object class with the correct animation ID. Then apply that animation object onto the humanoid u are targeting with :LoadAnimation() this works both on server and client (recommended client)

hasty hornet
#

Be sure to use the animator instance inside the Humanoid to Load the animation.

And be sure that your game is set to r6 or r15 only depending on what body type you used for your animation.

You can set your game to r6 only or r15 only by opening the avatar settings and pressing on the three dots. Then choose the correct body type.

#

Here is a example local script:


local Player = game.Players.LocalPlayer
local Humanoid = Player.Character:WaitForChild("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")

local Animation = Instance.new("Animation")
Animation.AnimationId = "" --Your AnimationId
local AnimationTrack = Animator:LoadAnimation(Animation)

Animation:Play()

crystal gate
crystal gate
#

@lean wind @old nacelle @hasty hornet if any of you could help me please dm

old nacelle
#

learn scripts

crystal gate
#

still learning animating

old nacelle
#

a typical animation loader script would look like this:

local character = script.Parent
local humanoid : Humanoid = character:WaitForChild("Humanoid")
local animator = humanoid.Animator
local animation = script:FindFirstChildOfClass("Animation")
local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()
#

you would need the script to be parented to the character, then create an animation object parented to the script and make sure you put the ID and yeah it should work

crystal gate
#

i dont think this wil work bc i have a lot of movement animations yk

hasty hornet
#

Or try to learn it yourself by investing some time into scripting

crystal gate
lean wind