I have made an animation shooting animation and posted it on Roblox studio, but for some reason after I typed the code roblox studio gave me this eror and the shooting dosent work
this is the code for the shooting
function loadSlot(Item)
local viewmodelFolder = game.ReplicatedStorage.Viewmodels
local moduleFolder = game.ReplicatedStorage.Modules
for i, v in pairs(camera:GetChildren()) do
if v:IsA("Model") then
v:Destroy()
end
end
if moduleFolder:FindFirstChild(Item) then
framework.module = require(moduleFolder:FindFirstChild(Item))
if viewmodelFolder:FindFirstChild(Item) then
framework.viewmodel = viewmodelFolder:FindFirstChild(Item):Clone()
framework.viewmodel.Parent = camera
fireAnim = Instance.new("Animation")
fireAnim.Parent = framework.viewmodel
fireAnim.Name = "Fire"
fireAnim.AnimationId = framework.module.fireAnim
fireAnim = framework.viewmodel.AnimationController.Animator:LoadAnimation(fireAnim)
end
end
end
and i added the codes for the gun
that im doing
local Settings = {
canAim = true;
aimSmooth = .08;
fireAnim = "rbxassetid://913376220";
canSemi = true;
canFullAuto = true;
fireMode = "Full Auto";
}