Aller au contenu
— —

Animator

Jouer une animation sur un personnage ou un PNJ.

Aussi appelé LoadAnimation AnimationTrack piste d’animation

C’est quoi ?

L’Animator se trouve dans le Humanoid. animator:LoadAnimation(anim) renvoie une AnimationTrack qu’on joue avec :Play() et arrête avec :Stop(). Priority décide quelle animation l’emporte.

Exemple en Luau
local h = perso:WaitForChild("Humanoid")
local animator = h:WaitForChild("Animator")
local piste = animator:LoadAnimation(script.Attaque)
piste.Priority = Enum.AnimationPriority.Action
piste:Play()

Erreurs fréquentes

  • Charger l’animation à chaque clic : charge-la une fois et rejoue la même piste.
  • Laisser la priorité Core : la marche par défaut recouvre ton attaque.
Documentation officielle Roblox (en français)

Utilise Animator dans ton propre jeu

Avec LearnBlox, tu crées ton jeu Roblox pas à pas, directement dans Roblox Studio. La formation « Les bases » est gratuite et Bloxi t’aide quand tu bloques.

Commencer gratuitement