When i start the server this error come "Argument 1 missing or nil" how i can fix it?

Localscript inside the tool

Player = game.Players.LocalPlayer

game.Workspace:WaitForChild()

stone = script.Parent

Anim = game.Lighting.Animations.StoneHold
Track = Player.Character:WaitForChild("Humanoid"):LoadAnimation(Anim)

stone.Equipped:Connect(function()
	Track:Play()
	Track.Looped = true
end)

stone.Unequipped:Connect(function()
	Track:Stop()
	
end)

4 comments

0

Make the 1st argument a non-nil value

0

How?

0

Try putting the animation inside of the tool and change variable Anim to: Anim = stone.StoneHold . Usually I put my animations inside of tools and it works out fine.

0

Line three isn't waiting for anything. That might be it.