I can't run the animation in **roblox** (I do have animations imported to group and tried every methods)

I keep wondering that why is the animation working in roblox studio instead of roblox itself.
Here are the videos.
Studio:
robloxapp-20200525-1901213.wmv (2.2 MB)
In game:
robloxapp-20200525-1900410.wmv (2.6 MB)

function LoadProperly(ID)
	local inst = ID 
	local anim = script.Parent.Humanoid:LoadAnimation(inst)
	return anim
end

local IA = nil
local LDN = nil
local RA = nil
local AA = nil
local ATA = nil



function Get_slotanims()
	wait(0.1)
	
	if IA then--cancel any anim active
		IA:Stop()
	end
	if LDN then
		LDN:Stop()
	end
	
	if RA then
		RA:Stop()
	end
	
	if AA then
		AA:Stop()
	end
	
	if ATA then
		ATA:Stop()
	end
	
	script.AnimChache:ClearAllChildren()
	
		local item = script.Parent:FindFirstChild("REPLICATEDITEM")
		if item then
			print("E")
			if item.Configuration:FindFirstChild("CharAnims") then
				
				
				if item.Configuration.CharAnims:FindFirstChild("Idle") then
					IA = LoadProperly(item.Configuration.CharAnims.Idle)
					IA:Play()
				end
				if item.Configuration.CharAnims:FindFirstChild("LoadUp") then
					LDN = LoadProperly(item.Configuration.CharAnims.LoadUp)
					LDN:Play()
				end
				if item.Configuration.CharAnims:FindFirstChild("Reload") then
					RA = LoadProperly(item.Configuration.CharAnims.Reload)
				end
				if item.Configuration.CharAnims:FindFirstChild("Aim") then
					AA = LoadProperly(item.Configuration.CharAnims.Aim)
				end
				if item.Configuration.CharAnims:FindFirstChild("Slice") then
					ATA = LoadProperly(item.Configuration.CharAnims.Slice)
				end
			end
	end
end

I can’t seem to run this in an actual game but the studio runs perfectly, does anyone know how to fix this?

If your game is in a group import your animations into your group.

1 Like

All the animations are in the group

Welp its no longer a problem, its because the animations might be outdated and needed to be created again.

It happens the same thing, even when its on a global script.

Studio:
robloxapp-20200526-1238192.wmv (3.4 MB)

In game:
robloxapp-20200526-1239372.wmv (2.0 MB)

The actual solution is either update the animations, or it might be the wrong rig.