Animation Problem with Custom Character

Hello, I have a big problem with the script of my tool.

I created an animation with a custom character but the character did not play it (the animation is ARI_Anims.Equipped).
image

The animations for the movement of the character works but this animation no and I do not know why… (The animation priority are Movement).

By the way, the animation priority was Action and I tried to set it as Action 4 but it did not change anything.

https://gyazo.com/7e6f35ec6888907b53493139ab7677ab

local rf = game:GetService("ReplicatedFirst")
local runs = game:GetService("RunService")
local ContextActionService = game:GetService("ContextActionService")
local TweenS = game:GetService("TweenService") 
local plrs = game:GetService("Players")

local tool = script.Parent
local equipped = false

local endreloaded = true
local zoomed = false
local ACTION_RELOAD = "Reload"

local CAMERA = workspace.CurrentCamera

local plr = plrs.LocalPlayer

repeat wait(1) until plr.CharacterAdded ~= nil 

local GUI = script.Parent.ARI
local LastAmmo = plr.Ammos.ARI

local mouse = plr:GetMouse()

local humanoid = plr.Character:FindFirstChildOfClass("Humanoid")

local function loadanimation(anim)
	return humanoid.Animator:LoadAnimation(anim)
end

local ARI_Aims = {
	Equipped = loadanimation(rf.Animations.ARI.ARIEquipped),
	Zoom = loadanimation(rf.Animations.ARI.ARIZoom)
}

local fired = false

tool.Equipped:Connect(function()
	if not ARI_Aims.Equipped.IsPlaying then ARI_Aims.Equipped:Play() end
	equipped = true
	local lastammos = plr.Ammos.ARI
	GUI.Parent = plr.PlayerGui
	GUI.Enabled = true
	
	runs.Stepped:Connect(function()
		if equipped then 
			-- Ammos Config

			GUI.Frame.Ammo.Text = lastammos.Value
		end
	end)

	mouse.Button1Down:Connect(function()
		if equipped then 
			fired = true
			while fired do 			
				if lastammos.Value > 0 then 
					lastammos.Value -= 1
				end

				wait(0.07)
			end
		end
	end)

	mouse.Button1Up:Connect(function() if equipped then fired = false end end)	

	mouse.Button2Down:Connect(function()
		if equipped then 
			if ARI_Aims.Equipped.IsPlaying then
				ARI_Aims.Equipped:Stop()
			end
			if not ARI_Aims.Zoom.IsPlaying then 
				ARI_Aims.Zoom:Play()
			end
			CAMERA.FieldOfView = 55
		end
	end)

	mouse.Button2Up:Connect(function()
		if equipped then 
			if not ARI_Aims.Equipped.IsPlaying then
				ARI_Aims.Equipped:Play()
			end
			if ARI_Aims.Zoom.IsPlaying then 
				ARI_Aims.Zoom:Stop()
			end
			CAMERA.FieldOfView = 70
		end
	end)

	local function handleAction(actionName, inputState, inputObject)
		if actionName == ACTION_RELOAD and inputState == Enum.UserInputState.Begin then
			if endreloaded and lastammos.Value < 35 then 
				endreloaded = false

				local realoadFolder = tool.Reload
				local zoomFolder = tool.Zoom
				
				local function updateTransparency(folder, value, mode)
					for i,v in ipairs(folder:GetChildren()) do 
						if v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("Part") then 
							if mode == "Tween" then
								v.Transparency = 0
								local anim = TweenS:Create(v, TweenInfo.new(0.5), {Transparency = value})
								anim:Play()
								wait(0.005)	
							else 
								v.Transparency = value
							end
						end
					end
				end

				updateTransparency(tool, 1, "normal")
				
				updateTransparency(zoomFolder, 1, "Tween")
				
				updateTransparency(realoadFolder, 1, "Tween")

				wait(0.5)
				
				updateTransparency(realoadFolder, 0, "normal")

				wait(0.5)
				
				updateTransparency(realoadFolder, 1, "normal")

				updateTransparency(zoomFolder, 0, "normal")

				updateTransparency(tool, 0, "normal")
				
				lastammos.Value = 35
				endreloaded = true
			end
		end
	end

	ContextActionService:BindAction(ACTION_RELOAD, handleAction, true, Enum.KeyCode.R)
end)

tool.Unequipped:Connect(function()
	equipped = false
	zoomed = false
	CAMERA.CameraType = Enum.CameraType.Custom
	CAMERA.FieldOfView = 70
	ContextActionService:UnbindAction(ACTION_RELOAD)
	GUI.Parent = tool
	GUI.Enabled = false
	fired = false
	wait(0.3)
	local animtracks = humanoid:GetPlayingAnimationTracks()
	for i,v in pairs(animtracks) do 
		if v.Name == "ARIEquipped" then
			v:Stop()
		elseif v.Name == "ARIZoom" then
			v:Stop()
		end
	end
end)
1 Like

Is the Animation owned by you?

No, the owner is my group because I published my game in the group.

You have to own the Animation in order to use it, for some reason Roblox updated so that only people who actually own the animation can use it.

You did not understand… The OWNER of the GAME is my GROUP, so animations need to be owned by the GROUP.

Try publishing the Animation again, but set the Creator to You when publishing it

It does not change anything about the problem.

It will change one thing: the visibility. In game, no one players will see it.

This might be a Bug, but are you editing a groups game or your own game?

What? Your sentence does not make any sense…

Groups can create experiences, is this Game created by You or the group? Because Group games can use Group animations

I have already said but I will do it again, the OWNER of the GAME ->>>> GROUP.

The OWNER of the ANIMATION ->>>> GROUP.

This is probably a bug that Roblox has, I cannot help you because Group Animations can be used by Group Games. Hopefully someone else has a Solution

1 Like

I do not know… I hope as well.

You need a raw animation track and then upload that to say for example: Your account. Then you can use that animation but another person cannot. If you want a group to have the animation then upload the animation to the group and any games under that group can use the animation. If this still isnt working then this is a roblox bug and i would make a post on #bug-report
image < Raw Animation Track
image < Regular Animation Instance

The OWNER of the GAME ->>>> my GROUP.

The OWNER of the ANIMATION ->>>> my GROUP.

Ok, well then make a #bug-reports post

Did you set a priority in the animation editor?

I advise you to read the post again… I have already said.

So, I created another animation but it’s the same thing, just one difference :

I moved the bones and no only rotated so I think it works only if we do not move the bones and only rotate.