Hi, I’m currently trying to animate some arms within a Viewport Frame so that they don’t clip through walls.
animating the rig works perfectly within the workspace however it doesn’t animate within the Viewport Frame. The rig has been duplicated from the workspace into the Viewport Frame so there shouldn’t be a problem with the rig.
I have checked the animator reference and it seems fine with prints so i don’t have any idea’s on what the problem could be.
My only other thought would be if Viewport Frames dont support animations but i wouldn’t expect that to be the case.
Here’s my code:
local ViewportFrame = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui",1).ViewportFrame
--Create Animation
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://15684646885"
--Reference Animators
local WorkspaceRigAnimator = workspace.WorkspaceRig.Humanoid.Animator
local ViewportRigAnimator = ViewportFrame.ViewportRig.Humanoid.Animator
--Load Animation Tracks
local WorkspaceTrack = WorkspaceRigAnimator:LoadAnimation(Animation)
local ViewportTrack = ViewportRigAnimator:LoadAnimation(Animation)
--Play Tracks
WorkspaceTrack:Play()
ViewportTrack:Play()
any help or alternative methods are welcome.
Thanks!