Can i play animations in View Port Frame?

Hi,
can I play animations in view port frame, if yes, how.
I tried script, and in workspace it worked and in view port frame not

1 Like

You can try updating the CFrame of each limb of a dummy based off a dummy in Workspace playing an animation every frame. I’ve done this trick before and it works well. Although I wouldn’t recommend to do it for anything more than a few parts. Hope this helped you!

4 Likes

and how to do this???

Clone the dummy in the workspace into the ViewportFrame then create a script that will update the dummy in the ViewportFrame’s CFrame to the dummy in the workspace which would be playing the animation. You can use RunService to update it every frame.

and do i need to set cframe of every part?

You’d need to set the CFrame of every body part, i.e Left Arm, Right Arm, Head, etc. But you can ignore the HumanoidRootPart cause we don’t need to change the CFrame of that.

did you think this?

local parts = {
["LeftFoot"]="",
["LeftHand"]="",
["LeftLowerArm"]="",
["LeftLowerLeg"]="",
["LeftUpperArm"]="",
["LeftUpperLeg"]="",
["LowerTorso"]="",
["RightFoot"]="",
["RightHand"]="",
["RightLowerArm"]="",
["RightLowerLeg"]="",
["RightUpperArm"]="",
["RightUpperLeg"]="",
["UpperTorso"]="",
["Head"]=""
}
local function update () 
while game["Run Service"].Stepped:Wait() do
	for part,_ in pairs(parts) do
		 script.Parent.ViewportFrame.elektrarna.Worker[part].CFrame=workspace.elektrarna.Worker[part].CFrame
	end
end
end
spawn(update)

Read this thread. It is doing something similar and may help you achieve what you want to do.