How can I animate a model with a character?

Hello everyone, so I recently finished ‘Jespone’s guide to animations’ Tutorial, and let me tell you I learned A LOT from it, but I still felt like I needed more information. What that little more information was for animating with models and parts.

The vent animation is exactly the little more information that I was searching for, it just looks so sick!!:fire::fire:

How can I make animations with models and parts like a sword or a tool pick up animation?

5 Likes

Is it because Jespone uses moon animator or something?

You usually rig external objects by making a “path” of Motor6Ds from the humanoid to this object
For example:
HumanoidRootPart → LowerTorso → UpperTorso → LeftUpperArm → LeftLowerArm → LeftHand
In this case I would guess that they did something like:
HumanoidRootPart → VentBase → MovingPartOfVent
In game you would have to firstly create the Motor6Ds between HumanoidRootPart and VentBase, and setting the origin offsets to the correct thing then the Motor6D between VentBase and MovingPartOfVent.

ArchMage RigEdit: RigEdit Lite - Roblox
Demonstration using ArchMages RigEdit plugin:
First rig the model
https://gyazo.com/d5e2700bd431b3e8eb0861dbb72ed6d7.mp4
Then offset both of the rig things
https://gyazo.com/dcdffc2e1832d5314ee6c49bb69d29e4.mp4
Then you can add and move all of the stuff you need to
https://gyazo.com/e90da0d6a348e0b598364516aab8a642.mp4

In game you would just have to “rerig” the model in a script, which just involves creating the Motor6Ds, setting their Part0 and Part1 properties, and for the smoothest experience set the offsets to the proper offset

4 Likes

Do I have to parent the vent to the character, when in game?

Yes you’ll have to temporarily parent it to the character.

1 Like

How would I do that? Like destroying it and then cloning it back to the player and after the player has gone through the vent, I delete the vent parented to the player and cloning back to the workspace?

You can probably just set its parent with no cloning or deleting

1 Like

@PapaBreadd When I try to rerig the vent and create the Motor6Ds, the player’s character snaps in this weird position:

Here is the script:

local ClickDetector = game.Workspace.Map.Vent.VentBase.ClickDetector
local VentBase = Instance.new("Motor6D")
local VentPart = Instance.new("Motor6D")
local Vent = game.ReplicatedStorage.Vent

ClickDetector.MouseClick:Connect(function(player)
	
	local chr = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
	
	local target = game.Workspace.Map.Vent.PrimaryPart
	
	function lookAt(chr,target) --assume chr is a character and target is a brick to look towards
		if chr.PrimaryPart then --just make sure the character's HRP has loaded
			local chrPos=chr.PrimaryPart.Position --get the position of the HRP
			local tPos=target.Position --get the position of the target
			local newCF=CFrame.new(chrPos,tPos) --create our CFrame
			chr:SetPrimaryPartCFrame(newCF) --set the HRP's CFrame to our result, thus moving the character!
		end
	end
	
	player.Character:moveTo(Vector3.new(-42, 3, -27.61 ),lookAt(chr, target))
	
	lookAt(chr, target)
	
	game:GetService("ContextActionService"):BindActionAtPriority(
		"t",
		function()
			return Enum.ContextActionResult.Sink
		end,
		false,
		Enum.ContextActionPriority.High.Value + 1,
		unpack(Enum.PlayerActions:GetEnumItems())
	)
	
	local newVent = Vent:Clone()
	newVent.Parent = player.Character

	VentBase.Name = "VentBase"
	VentBase.Part0 = chr.HumanoidRootPart
	VentBase.Part1 = chr.Vent.VentBase
	VentBase.Parent = chr.HumanoidRootPart
	
	VentPart.Name = "VentPart"
	VentPart.Part0 = chr.Vent.VentBase
	VentPart.Part1 = chr.Vent.VentPart
	VentPart.Parent = chr.Vent.VentBase
	
	
	
	--game.ReplicatedStorage.RemoteEvent:FireServer(player)
end)

game.ReplicatedStorage.RemoteEvent2.OnClientEvent:Connect(function(isnotMoving) 
	if isnotMoving == false then
		game:GetService("ContextActionService"):UnbindAction("t")
	end
end)

How can you set the offsets, it gives me a wierd glitch when I parent it with the character.