I am trying to create a script that will put the tool that I click the player with onto them.
Here’s the error V
Here’s the code that is getting the error V
local mouse = game.Players.LocalPlayer:GetMouse()
script.parent.Activated:Connect(function()
if(mouse.Target) then
local model = mouse.Target.Parent
if (model and model:FindFirstchild("Humanoid") and model.Name ~= game.Players.LocalPlayer.Name) then
script.Parent.wear:FireServer(model)
end
end
end)
I’m very new to coding and get frustrated very easily, I am trying not to throw my pc through my window rn.