Dummy inside 3d gui wont animate

My dummy inside this gui won’t play any animations. When i change the target playing animations to me, it plays perfectly fine. Idk whats going on.
Here’s where I reference all my animation playing stuffs. As you can see, nothing plays on the dummy.

local function onCharacterAppearanceLoaded(character)
	task.wait(1)
	character.Archivable = true
	local cloned = character:Clone()
	cloned.Parent = viewportFrame
	local anims = script.Animations
	if anims ~= nil then
		local playanim = cloned.Humanoid.Animator:LoadAnimation(anims.None.Idle)
		playanim:Play()
	end

	character.Archivable = false

	local rigcframe = game.ReplicatedStorage.LocalCloning.Rig.PrimaryPart.CFrame
	cloned:SetPrimaryPartCFrame(rigcframe)
	
	characterdisplay = cloned

end
for i, button in ipairs(gui.Frame.Sroll.Personalities:GetChildren()) do
	button.MouseButton1Click:Connect(function()
		smthselected = true
		local anims = script.Animations:FindFirstChild(button.Name)
		selectedpersonality = anims
		if anims ~= nil then
			local playanim = characterdisplay.Humanoid.Animator:LoadAnimation(anims.walk)
			playanim:Play()
		end
	end)
end

Not to mention, the tool that the dummy equips in Props doesnt even show up.

local destroythisprop = nil
for i, button in ipairs(gui.Frame.Sroll.Props:GetChildren()) do
	if destroythisprop ~= nil then
		destroythisprop:Destroy()
	end
	button.MouseButton1Click:Connect(function()
		smthselected = true
		local prop = RS.LocalCloning.RoleplayPack.Props:FindFirstChild(button.Name)
		--if prop ~= nil then
			selectedprop = prop
			local clonedprop = prop:Clone()
			clonedprop.Parent = characterdisplay
			destroythisprop = clonedprop
		--end
	end)
end

function onEquipped()
	owner = script.Parent.Parent
	loadideanim = owner.Humanoid.Animator:LoadAnimation(idleanim)
	loadideanim:Play()
end

This is should be a easy fix just use a WorldModel inside your viewport frame.
It should look something like this:
image

This just helps to add physics which your animation uses in your viewport.

1 Like

Hey thanks so much it works!! Any idea how to fix the tool thing ?
image

What do you mean by fixing the tool thing ?

I mentioned that tools dont show up when the dummy equips it

You can also see in the video that when I click on the button in Props, it doesn’t hold anything
It’s there, it’s putting up the hand (now that animations work), its just that the model isnt showing
I also updated the code for that

local destroythisprop = nil
for i, button in ipairs(gui.Frame.Sroll.Props:GetChildren()) do
	button.MouseButton1Click:Connect(function()
			if destroythisprop ~= nil then
				destroythisprop.Parent = script.Props
			end
			smthselected = true
			local prop = script.Props:FindFirstChild(button.Name)
			--if prop ~= nil then
			selectedprop = prop
			
			prop.Parent = characterdisplay
			destroythisprop = characterdisplay:FindFirstChild(button.Name)
		--end
	end)
end

Apologies for not noticing that part of your problem. I would recommend updating a new camera on the viewport since the old camera that captures your character doesn’t update any new items added.

1 Like

My camera isnt assigned to only look at the player model, though?

local viewportCamera = Instance.new("Camera")
viewportFrame.CurrentCamera = viewportCamera
viewportCamera.Parent = viewportFrame

viewportCamera.CFrame = game.ReplicatedStorage.LocalCloning.Camera.CFrame

Sorry, im a wee confused

What else does your camera focus on then?

These are the only lines in my script that reference the camera. Do you want the full script?

Maybe I’m wrong with the camera part but I found another person explaining on how to make sure the tool gets properly equipped in a viewportframe.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.