#Gear Animation

1 messages · Page 1 of 1 (latest)

warm orchid
#

Hi! I'm trying to add a Tommy Gun to my game but the custom animations I put in my game is overriding the gear animation. How do I fix that?

stark veldt
#

Are yoiu using the animate script in character to add your custom animations?

stark veldt
#

what type of custom animations are you running and what animations are you trying to run for the tommy gun

#

when you export the animation, you gotta make sure it is set to action to igve it a higher priority when playing

warm orchid
#

this is the script im running for the custom animations:

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

-- Use Animator
local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid)

local animationIds = {
Idle = "rbxassetid://118263013079828",
Walk = "rbxassetid://79319074076323",
Run = "rbxassetid://507767714",
Jump = "rbxassetid://72283894851544",
Fall = "rbxassetid://130535120072397",
Climb = "rbxassetid://108757064184974",
Swim = "rbxassetid://507784897",
DoubleJump = "rbxassetid://99070131460526",
}

local animateScript = character:FindFirstChild("Animate")
if animateScript then
animateScript:Destroy()
end

local animations, loadedAnimations = {}, {}
for name, assetId in pairs(animationIds) do
local anim = Instance.new("Animation")
anim.Name = name
anim.AnimationId = assetId
animations[name] = anim
end

local function playAnimation(name)
-- stop others
for animName, track in pairs(loadedAnimations) do
if animName ~= name and track.IsPlaying then
track:Stop()
end
end
-- play new
if animations[name] then
if not loadedAnimations[name] then
loadedAnimations[name] = animator:LoadAnimation(animations[name])
end
local track = loadedAnimations[name]
if not track.IsPlaying then
track:Play()
end
end
end

-- state changes
humanoid.StateChanged:Connect(function(_, state)
if state == Enum.HumanoidStateType.Jumping then
playAnimation("Jump")
elseif state == Enum.HumanoidStateType.Freefall then
playAnimation("Fall")
elseif state == Enum.HumanoidStateType.Climbing then
playAnimation("Climb")
elseif state == Enum.HumanoidStateType.Swimming then
playAnimation("Swim")
elseif state == Enum.HumanoidStateType.Seated or state == Enum.HumanoidStateType.Landed then
playAnimation("Idle")
end
end)

-- movement
humanoid.Running:Connect(function(speed)
if speed > 0 then
playAnimation("Walk")
else
playAnimation("Idle")
end
end)

-- double jump
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DoubleJumpEvent = ReplicatedStorage:FindFirstChild("DoubleJumpEvent")
if DoubleJumpEvent then
DoubleJumpEvent.OnClientEvent:Connect(function()
playAnimation("DoubleJump")
end)
end

-- start idle
playAnimation("Idle")

#

as for the Tommy Gun i exported it through the gears shop

stark veldt
#

I'm guessing you didn't make the animations so that could be why, they might've set the priority to something lower than your custom animations

#

you can use animation spoofer

#

to grab the animation then edit it and set the priority to action

#

then export and use that new publisehd animation

warm orchid
stark veldt
#

then edit the animation

warm orchid
#

ty!

stark veldt
#

no problem