Playing Character Animations in ViewportFrame

How would I go about recreating this? All I know as of the moment is that the character itself should be inside a world model parented to the viewportframe.


image

You would have to setup the camera so you could view the character model. After setting up the character you can use Animator located inside of the humanoid to play the animation. You would need a local script because this is client sided.

For playing the animation you can connect it to button enter event. You can learn more about this event here: GuiObject | Documentation - Roblox Creator Hub

You could do this like you would normally do:

Example of playing an animation:

local Animation --Animation Instance
local Character --Roblox Character Model

local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid.Animator

local LoadedAnimation = Animator:LoadAnimation(Animation)

LoadedAnimation:Play()
1 Like

Alright, lets break this down.

First, you’ll need to add your model to workspace and move it wherever you please.
Second, create a small part make sure its anchored and call it “CamPart” and set its transparency to 1 if you want.

Make sure the model is facing the campart, you can check this by clicking the “move” tool and seeing if the camparts blue arrow is pointing towards the model. (P.S. since there’s two blue arrows its a 50/50 chance you get it right the first time, if not then just move the model on either side of the blue arrows)

now we’re just using the campart as a guide take the position of the campart and copy and paste into the position of the camera.

Third, add the campart and the model to the WorldModel

Remember to set the currentcamera of the viewportframe to the camera were using. If you did it right you should see the player.

If you can’t see the player the model is on the wrong side of the campart and just move it to the other blue arrow side. now you just animate the character in workspace and whenever the player’s mouse enters the frame play the animation.

You can also change the orientation of the campart and then copy and paste it over the the camera to get side angles.

1 Like

Thanks so much! I tried that method, it works! I’ll just try to fix the animation thingy. Thanks to both that helped!