Issue Playing Animation on BaseParts using AnimationController/Animator

Hi,

I am working on a project that has a short cutscene for opening doors. I am having an issue with the door specifically.

The setup of the door rig is this:

You press a ProximityPrompt object to trigger the animation. However, the door seems to be able to load the animation, but playing it does not visibly do anything.

The animation script, if needed (NOTE: I haven’t implemented the full cutscene yet, just testing the door itself):

local door = script.Parent;

local animationController = door:FindFirstChildOfClass("AnimationController");
local animator = animationController:FindFirstChildOfClass("Animator");

local doorRoot = door.DoorRoot;
local doorPrompt = doorRoot.Prompt;

local animationId = 85219084389209;

local function Triggered(player: Player)
	local animation = Instance.new("Animation");
	animation.AnimationId = "rbxassetid://" .. animationId;

	local animationTrack = animator:LoadAnimation(animation);
	animationTrack:Play();	
end

doorPrompt.Triggered:Connect(Triggered);

I animated everything using Moon 2 and used File > Export Rigs, exported the KeyframeSequence to Roblox and then put the AnimationId of that into this script I quickly made as a test.

Any help or solutions anyone could provide? Regardless, thanks for reading!

I was able to fix this myself after a bunch of debugging and problemsolving!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.