I have an NPC inside of a ViewportFrame that I want to animate when you interact with it. The NPC is not anchored, and I've made sure my script works by using prints and I receive no errors.
1 | Button.Activated:Connect( function () |
2 | if not buttonActivated then |
3 | local animation = Button.ViewportFrame.NPC.Humanoid:LoadAnimation(Button.Idle) |
4 | animation:Play() |
5 | end |
6 | end ) |