Hello, I’m currently working on my own gun system for my group and I cant figure out how to fix this error,
I’ve looked it up on DevForum but I can’t find an answer that works.
Here’s my code:
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:FindFirstChild("Humanoid")
local animation = script.Parent.Idle
local animtrack = humanoid:LoadAnimation(animation)
local function equip()
animtrack:Play()
end
local function unequip()
animtrack:Stop()
end
script.Parent.Equipped:Connect(equip)
script.Parent.Unequipped:Connect(unequip)
I hope someone responds soon, thanks.
–Luke