Is It Possible For Animations To...?

Is it possible to make a full-body animation only animate certain parts of the body at certain times?

I’m incorporating weapons into my game, and that requires the animation attack using a broom. The animation is done, and all it needs is to be implemented in the game. I did this, but I have another concern.

In the animation, all parts of the body are used for the animation. When I’m walking, only the upper body needs to be animated, otherwise it’ll look unrealistic and imperfected.

I’ve tried to just cut the legs from the animation, but due to the rapid movement of the torso it looks too goofy.

Thanks in advance.

5 Likes

you can achieve this by setting the attack animation to have the same priority as the walking animation, this will ‘mix’ them together

i do this myself with custom walking animations and it works just fine

1 Like

If the priority of the walking animation is ‘Movement’ then the animation still overrides them. I can’t tell if this is an animation thing or not though

1 Like

i don’t really work with core animations so i cna’t help you with this

3 Likes

When animating, try not to animate the legs of the character. Even though the animation will look a little unnatural, the legs will still have a walking animation when the character moves.

1 Like

I ended up solving it:

I used a method of blending both animations to make it seem seamless. For the server, I roughly had

local function BlendAnimations(fromTrack: AnimationTrack?, toTrack: AnimationTrack, fadeTime: number)
	if not toTrack.IsPlaying then
		toTrack:Play(fadeTime)
	end
	
	if fromTrack and fromTrack.IsPlaying then
		toTrack.TimePosition = fromTrack.TimePosition
	end
	
	if fromTrack and fromTrack.IsPlaying then
		fromTrack:AdjustWeight(0, fadeTime)
	end
	
	toTrack:AdjustWeight(1, fadeTime)
end

local function UpdateActionAnim(player: Player, state: string)
	local character = player.Character
	if not character then return end

	local humanoid = character:FindFirstChild("Humanoid")
	if not humanoid then return end

	local animator = humanoid:FindFirstChildOfClass("Animator")
	if not animator then return end
	
	local data = playerTracks[player]
	
	if not data then return end
	if data.state == state then return end
	data.state = state
	
	if state == "Idle" then
		BlendAnimations(data.Upper, data.Full, .5)
	elseif state == "Walking" then
		BlendAnimations(data.Full, data.Upper, .5)
	end
end

AnimationSwitch.OnServerEvent:Connect(function(player, state)
		playerStates[player] = state
		UpdateActionAnim(player, state)
	end)

Client:

--get humanoid and stuff....

humConnection = humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
		local isMoving = humanoid.MoveDirection.Magnitude > 0
		local newState = isMoving and "Walking" or "Idle"

		if newState ~= lastState then
			AnimationSwitch:FireServer(newState)
			lastState = newState
		end
	end)

and voila:

(Minor help from ChatGPT)

1 Like

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