Help Using World Model

Hello there, I’m having trouble using WorldModel. I currently have it set up like this (Muck being the model showing in the ViewportFrame):
This is what the character model looks like (I don’t know if this would have any affect):

For some reason the animation is only playing when I make the ViewportFrame visible, then invisible repeatedly like in the video.
If I don’t make the ViewportFrame invisible then the character just stand still.

This is the complete script

local viewportFrame = script.Parent.Parent

local object = script.Parent.Muck

object.Parent = script.Parent

local viewportCamera ="Camera")

viewportFrame.CurrentCamera = viewportCamera

viewportCamera.Parent = viewportFrame

viewportCamera.CFrame = + (object.RootPart.CFrame.lookVector*9),object.RootPart.Position)

local animation ="Animation")

animation.AnimationId = ""

local AnimationController = script.Parent.Muck.AnimationController

local animationTrack = AnimationController:LoadAnimation(animation)

animationTrack.Looped = true


while true do

viewportFrame.Visible = true


viewportFrame.Visible = false



I’ve tried using the solutions in every other post on this topic but none of them are working for me. Thank you!

Have you tried putting the LocalScript in the WorldModel?

1 Like

Thank you for the response, I tried it just now, no animations are playing. I get the same exact results as before.

Can you record any possible video of the issue? Also you should make sure it has a high animation priority, it could be getting overlapped.

There isn’t really anything to record since the character is just standing still. No other animations are playing so it shouldn’t be getting overlapped right? The character is also rigged in blender using bones, could this be causing the issue at all?

Core animation priority can be quite buggy, so it might. I always make sure to. And, I don’t know much about animating with bones, but it shouldn’t be an issue. Have you seen the animation play in the editor? It could be an issue with the rig. The last thing I could think of is it being an issue of it using an AnimationController over a Humanoid, but I don’t think that’s it, I just don’t know much about AnimationControllers.

1 Like

The animation priority is set to action, so it shouldn’t be getting overlapped, and yes, I have seen the animation play in editor. If I use this script (without the camera part), with the model in workspace it runs the animation fine. Just having trouble making the animation show up in the ViewportFrame. I appreciate the help though.

1 Like

I was wrong, it does sometimes work (kinda). About half the time it finishes the animation cycle and the other half it stops midway through the animation. However, the animation never loops.
Here’s a video

I edited the original post completely, as I have discovered more things going on with the problem.

Saw your message, fixed this problem a while ago, but if I recall correctly I am fairly sure you have to replay the animation every time you make the viewport visible.

1 Like