I am trying to make an animation when you pick up stuff but it keeps saying:
Workspace.Part.Script:2: attempt to index nil with 'Character'
script.Parent.ClickDetector.MouseClick:Connect(function() local ani = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Pickup) ani:Play() end)
Local player cannot be used in Server Sided script. However, you can utilize the first parameter of a click which is the player who clicked it. Try this out:
script.Parent.ClickDetector.MouseClick:Connect(function(plr) local ani = plr.Character.Humanoid:LoadAnimation(script.Parent.Pickup) ani:Play() end)