Unable to animate skinned mesh in a ViewportFrame

Hi

I’m trying to animate a skinned mesh in a viewportframe, however the animation doesnt play in the world. The script works fine with no errors (printing “playing” after triggering the animation is successful), and the hierarchy within StarterGUI seems correct

Im not really sure what the issue is here

Script:

local StarterGui = game:GetService("StarterGui")

local trigger = script.Parent
local animatableModel = StarterGui.Skybox.ViewportFrame.SkyboxParts:WaitForChild("combine_citadel001")
local animatableObject = animatableModel:WaitForChild("Combine_Citadel_animated_reference")
local animator = animatableModel.AnimationController:WaitForChild("Animator")
local hasTriggered = false
local prompt = script.Parent.ProximityPrompt

local combineCitadelOpen = Instance.new("Animation")
combineCitadelOpen.AnimationId = "rbxassetid://13158205150"
local loadedAnim = animator:LoadAnimation(combineCitadelOpen)

prompt.Triggered:Connect(function()
	print("Playing")
	loadedAnim:Play()
end)

Hierarchy in StarterGUI (the highlighted mesh is the one being animated)
2023-04-17 00_46_22-trigger_manager (iNazgxl Editing) - Roblox Studio

Thanks

Figured it out, I needed to trigger the animation from a LocalScript.

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