#Cant seem to have the shooting work on my fps game

1 messages · Page 1 of 1 (latest)

waxen plank
#

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";

}

sand lion
#

are the animations and stuff public?

waxen plank
#

yes i posted it on roblox studio

sand lion
#

is the asset id in your script correct?

waxen plank
#

yes

sand lion
#

well in your script its not 76929264368697

#

and the asset id for the animation I copied it and got 76929264368697

waxen plank
#

i fixed it just now

#

and i still gives the same error

#

in output