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)
Thanks