#Basic Animation Code Issue

1 messages · Page 1 of 1 (latest)

open flume
#

I have been battling with my code for like the past two hours trying to get an animation to work when the player joins the game.

I've went around searching for answers through trying to Google any similar situations on the dev forums but to no avail.

I went back and literally copied the code from the animation video brawldev made and have even tried to make sure through code that the priority is correct.

It works perfectly on the custom rig I imported and a generic r6 rig but not on my player when I load in at all.

I feel as though the answers really simple but I really just can't get it.

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local animationTrack = animator:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action4

task.wait(5)

animationTrack:Play()

The animation I'm trying to get is also inside the local script but I forgot to expand it

If it's any help here's also the custom rig I'm making use of https://devforum.roblox.com/t/r6-ik-fk-blender-rig-v171/3586405

jaunty citrus
amber drumBOT
#

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

jaunty citrus
#

what i would do here is to make a function to play the animation

#

and connect it to a characteradded event

open flume
#

I will get back to you