I have a gun but the gun does not appear but says this error
![]()
Code in the Script
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local tool = script.Parent
local idleAnim = char:WaitForChild("Humanoid"):LoadAnimation(script.Parent.GunClient.IdleAnim)
local shootAnim = char:WaitForChild("Humanoid"):LoadAnimation(script.Parent.GunClient.ShootAnim)
tool.Equipped:Connect(function()
game.ReplicatedStorage.Events.ConnectM6D:FireServer(tool.BodyAttach)
char.UpperTorso.ToolGrip.Part0 = char.UpperTorso
char.UpperTorso.ToolGrip.Part1 = tool.BodyAttach
idleAnim:Play()
end)
tool.Unequipped:Connect(function()
game.ReplicatedStorage.Events.DisM6D:FireServer()
idleAnim:Stop()
end)
plr.Character.Humanoid.Died:Connect(function()
game.ReplicatedStorage.Events.DisM6D:FireServer()
if idleAnim.Playing then
idleAnim:Stop()
else
shootAnim:Stop()
end
end)
tool.Activated:Connect(function()
shootAnim:Play()
end)
other thing forgot what its called

thank you for reading this.