LoadAnimation requires the AnimationController object (MP5.AnimationController) to be a descendant of the game object?
local Gun=game.ReplicatedStorage.GunStorage.MP5:Clone() local Controller=Instance.new("AnimationController") local ShootValue=game.ReplicatedStorage.GunValue.MP5:WaitForChild("ShootingAnim1").Value local ShootAnim1 =Instance.new("Animation") ShootAnim1.AnimationId ="rbxassetid://"..ShootValue ShootAnim1.Parent=Gun Controller.Parent=Gun local LShootAnim1=Controller:LoadAnimation(ShootAnim1)
LoadAnimation requires the Humanoid object (MP5.Humanoid) to be a descendant of the game object? umm...
local Gun=game.ReplicatedStorage.GunStorage.MP5:Clone() local GunHum=Gun:WaitForChild("Humanoid") local Controller=Instance.new("AnimationController") -- local ShootValue=game.ReplicatedStorage.GunValue.MP5:WaitForChild("ShootingAnim1").Value local ShootAnim1 =Instance.new("Animation") ShootAnim1.AnimationId ="rbxassetid://"..ShootValue -- ShootAnim1.Parent=Gun Controller.Parent=Gun local LShootAnim1=GunHum:LoadAnimation(ShootAnim1)
Basically you forgot to parent the animation on line 6
local ShootAnim1 =Instance.new("Animation") ShootAnim1.AnimationId ="rbxassetid://"..ShootValue ShootAnim1.Parent = gun -- Parent the animation?
The animations do need to be in the game for them to work
Another EDIT
The more I look at yours it makes me think because I don't think you can load animations onto a object that isn't in workspace.