Code:
_G.PutToolOn = function(plr,tooltoquip,class)
if tostring(tooltoquip) == "Hatchet" then
local arm = game.Workspace.tostring(plr)['Right Arm']
local iten = game.Lighting:findFirstChild(tostring(class).."Hatchet"):clone()
iten.Parent = game.Workspace
local w1 = Instance.new("Weld",arm)
w1.Part0 = arm
w1.Part1 = iten.Handle
w1.C0 = CFrame.new(0,-1,-.8) * CFrame.fromEulerAnglesXYZ(80,0,0)
end
end
Output:
21:16:27.792 - _G.PutToolOn(Player1,Hatchet,Bronze):1: attempt to call field 'PutToolOn' (a nil value)
Called it in command bar with:
_G.PutToolOn(Player,Hatchet,Bronze)
The function is in a normal script in ServerScriptService

3 comments
Take a close look at line 3. :P
just do repeat wait() until _G.PutToolOn _G.PutToolOn(Player,Hatchet,Bronze); also, fix line 3
It isn't working, fixed line 3. Same output as before