How do you disable player character animations?

I’m animating a tool right now, and I got the idle and fire animations to work. But my character animation is really screwing up the orientation of the animation. How do I disable that for all players? So I can play my guns own custom animations?

2 Likes

Can you give clearer examples? Add some videos too. I know a lot about animation but I can’t tell you much because it lacks precision.

I have a possible solution to this, but I need more information to know what exactly happens.

I have a default avatar ROBLOX animation that plays when I’m idle, walking etc. And it’s overlapping when I play a animation via script.

https://gyazo.com/61483cf4c18ec73f1549afeaf8dde42e

So I’m getting massive sway when I start moving because of the avatar animation.

1 Like

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: