Roblox issues running animations in studio using a plugin

I have had a plugin, it now has over 500 downloads and I figured I don’t work today so I will improve it, but I noticed when trying to showcase a animation to the user via a ViewportFrame it does not work. I did some troubleshooting and it looks like this only runs inside of a playing roblox studio session and not just in roblox studio via the plugin. Is there a module I can require to get this to work? here is a video showcasing it not working in regular studio, then working in a launched studio session. [Link to video](https://gyazo.com/4dbef0534895836389596f93203ec59c)
Code for playing animation that works

local NewAnimation = Instance.new("Animation")
			NewAnimation.AnimationId = "rbxassetid://"..GetNumbersFromAString(tostring(ID))
				local animationTrack = animator:LoadAnimation(NewAnimation)
			animationTrack.Looped = true
			animationTrack:Play()