How do you disable player character animations?

you place a script inside the “StarterCharacterScripts”, you then write this

local char = script.Parent
local root = char:WaitForChild("HumanoidRootPart")
local hum = char:WaitForChild("Humanoid")
local anim = char:WaitForChild("Animate")

while true do
if root and hum and anim then
anim:Destroy()
break
end
task.wait()
end

or if you don’t want to destroy the animate script, you simply replace the destroy function with a disabled one instead

4 Likes

A easy fix would be to set the animation’s priority:
AnimationTrack | Roblox Creator Documentation, to Action.

This property sets the priority of an AnimationTrack. Depending on what this is set to, playing multiple animations at once will look to this property to figure out which Keyframe Poses should be played over one another.

You can put a localscript inside StarterCharacterScripts Then call it Animate then you can put your own animation code there.

You can also do Animator:GetPlayingAnimationTracks() and then manually stop them.

Or you can set the priority of your animations higher so that they override the default animations. I recommend you do that.

1 Like

But isn’t “animate” required to run any further animations?

How do you set priority? How do you set priority?

Try this script:

local function DisableHandOut(character)
	local Animator = character.Animate
	local Animation = Instance.new("Animation")
	Animation.AnimationId = "http://www.roblox.com/asset/?id=0"

	local ToolNone = Animator:FindFirstChild("toolnone")
	if ToolNone then
		local NewTool = Instance.new("StringValue")
		NewTool.Name = "toolnone"
		Animation.Name = "ToolNoneAnim"
		Animation.Parent = NewTool
		ToolNone:Destroy()
		NewTool.Parent = Animator
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		DisableHandOut(character)
	end)
end)

Modified from: How to delete the "Hand up" animation that plays when equipping a tool? - #10 by Intrance

1 Like

Didn’t work D: Didn’t work D: Didn’t work D: Didn’t work D:

I guess I need walking animations perhaps?

you have to simply make a new animation from scratch using either the default animator plugin, in that plugin you simply create a keyframe for the upper torso, lower torso, head so it does not wiggle around

export the animations (or combine the idle gun hold with this too) then replace the ID in your custom thing

I created an animation, I’m using 1 for idle and shoot. And the idle one uses arms, yet the arms still bob. Or is it because my uppertorso is moving?

it’s because of your upper torso moving, when you make an animation and don’t include a part (with keyframes) in the animating board it will not be effected but will effect the relative positions of the part it has connected to, you have to make the uppertorso and lower torso stop moving

1 Like

So how do I go about making a weapon sway animation, do I just play separate animations is x key is held down? Like (a) left sway animation, (d) right sway etc?

i don’t know where you’re going with the topic since this is unrelated but i don’t know what weapon sway exactly means, i googled it and i saw on reddit weapon sway is the process of the weapon moving on all its own while you ADS (aim down sights)

i don’t know anything else that’ll help solve this issue apart from my other suggestions since R15 is a glitchy rig since it uses 15 exact bones

I’m just asking questions about animations at this point.

Weapon sway is when you’re moving (both ads and non ads) it’s just your arm basically slightly rotating. Ever played a fps? Your gun rotates slightly in the direction you’re moving. If you move left, gun rotates to the left slightly while left key is down and vice versa.

yeah this is possible and easy to do, you basically use CFrames instead of animation to make this easier, you basically have to get the extended X-axis of your humanoid root part’s velocity and apply it on your gun (make sure to balance the calculation), you don’t have to do some adjustments like (if walkingright or walking left then) thing

i also suggest using Lerp as it is smooth and unlike linear CFrames don’t lifelessly move

Any examples? That doesn’t mean much to me :stuck_out_tongue:

you get the velocity of the humanoidRootPart and see if the humanoid’s move magnitude is above 0, you lerp the weapon’s CFrame offset
of the humanoidRootPart’s velocity i mentioned earlier, make sure to divide and clamp it to a maximum (like 1.5 studs)

Sorry for late reply I completely forgot about this thread.

To set to a higher priority go to your animation editor.

Click the options button in the upper-left section of the editor window.

Choose an option from the Set Animation Priority menu. In a game, if you play an animation with a higher priority than one that’s already playing, the new animation will override the old.

Alternatively simply change the animation priority via script.

local AnimationTrack = Animator:LoadAnimation(Animation)
AnimationTrack.Priority = Enum.AnimationPriority.Action
1 Like

But it seems like my animation is playing, like my shoot and idle animation is playing but my character still has his Avatar walk animation.

the only issue that you have is the torso and uppertorso moving making the arm basically stupid looking, you have to add a keyframe for the uppertorso, lower torso (you dont need to move them btw but that’ll make them stay in place)

3 Likes