Model Animation | AnimationController not playing animation

I am trying to make a model with an animation in Roblox Studio, but my animation refuses to play despite having everything, but the PrimaryPart “Core” in the model “Main” in “FL1”.

Could anyone help me resolve my ongoing issue?

local Tween = TweenInfo.new(17, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local FastTween = TweenInfo.new(0.6, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local TweenService = game:GetService("TweenService")

local PL1Overload = game.ReplicatedStorage.Events.PL1Overload
local PowerLazer = script.Parent.Main

PL1Overload.Event:Connect(function()
	PowerLazer.Utilities.Sounds.Explode:Play()
	wait(0.1)
	PowerLazer.Utilities.Explosion.MiddlePoint.Ember:Emit(20)
	PowerLazer.Utilities.Explosion.MiddlePoint.Fireball:Emit(20)
	PowerLazer.Utilities.Explosion.MiddlePoint.Smoke:Emit(20)

	PowerLazer.Utilities.Explosion.MiddlePoint2.Fire.Enabled = true

	game.Workspace.Map.ReactorChamber.Components.FusionLazers.FL1.Main.OuterBeam.ParticleEmitter.Enabled = false
	TweenService:Create(game.Workspace.Map.ReactorChamber.Components.FusionLazers.FL1.Main.InnerBeam, FastTween, { Transparency = 1 }):Play()
	TweenService:Create(game.Workspace.Map.ReactorChamber.Components.FusionLazers.FL1.Main.OuterBeam.beam.Beam, FastTween, { Brightness = 0 }):Play()

	for _, objects in pairs(PowerLazer.Lights:GetDescendants()) do
		TweenService:Create(objects, FastTween, { Color = Color3.fromRGB(17, 17, 17) }):Play()
	end

	wait(2)

	PowerLazer.Utilities.Sounds.Screech:Play()
	PowerLazer.AnimationController:LoadAnimation(PowerLazer.Animation):Play()
end)

1 Like

You have to set the animation’s Priority to Core. If that doesn’t work, let me know.

1 Like

there is one major issue here, AnimationController is completely broken when I last tried it and will not play the animation!
add a Animator Instance in the animation controller and use it instead

1 Like

maybe u need to use an animator since animationcontroller:LoadAnimation() is deprecated, but it may still work.
are there any errors in the output?

1 Like

I couldn’t find any errors whatsoever in the output sadly.

1 Like

it is written in roblox devhub

" When the deprecated method is called from an AnimationController, the controller itself does nothing regarding the animation intended to be loaded"

it also says it creates a animator automatically but that mostly doesnt work and deprecated

1 Like

I’ll try this as soon as possible. One moment…

so you need to put an animator inside animationcontroller right?

is it automatically in there?

yes you need to put a animator and use it instead, animationcontroller became a instance to store a animator without a humanoid nothing else

the devhub says it is there automatically when LoadAnimation is called but the last time I checked it didnt work

Well, I tried that, but it still just didn’t do anything whatsoever.
The laser is supposed to fall shortly after exploding, but nothing occurred.

use :WaitForChild(“Animator”) right?

PowerLazer.AnimationController:WaitForChild("Animator"):LoadAnimation(PowerLazer.Animation):Play()

Like that?

yeah like that i think( character limits brah)

Screenshot 2024-03-29 162521
Nope…
No falling.

I’ll provide an RBXM file soon.

idk it might have something to do with animation but can you try like putting it into a variable like

local Animator = PowerLazer.AnimationController:WaitForChild(“Animator”)

local Animation = Animator:LoadAnimation(PowerLazer.Animation)

Animation:Play()

I’ll just give you the FL1 RBXM file. You may have to add in a BinableEvent and fire it for it to work

local PL1Overload = game.ReplicatedStorage.Events.PL1Overload

Change this code in the Overload script located in the model, and make it link to your BinableEvent.
Goodluck!
PL1 Model.rbxm (216.0 KB)

im using mobile brah, ok later ill try later

Alright, thank you.
I will highly appreciate your assistance if you manage to fix the issue.

(The keyframe animations, along with the animations are located here.)
Screenshot 2024-03-29 163323
Screenshot 2024-03-29 163426

Have you come up with anything?
I’m helping Codex with a game that has the model in it. I just want to know if you came to a solution.