--Local Script: local player = game.Players.LocalPlayer local Tool = script.Parent local mouse = player:GetMouse() local Character = player.CharacterAdded:Wait() local ReplicatedStorage = game:GetService("ReplicatedStorage") local ItemGive = ReplicatedStorage:FindFirstChild("ItemGive") local isEquipped = false Tool.Equipped:Connect(function() isEquipped = true end) Tool.Unequipped:Connect(function() isEquipped = false end) mouse.Button2Down:Connect(function() print("Yes1") --Gets printed if isEquipped == true then print("Yes2") --Gets printed local MouseTarget = mouse.Target if MouseTarget ~= nil then print("Yes3") --Gets printed if MouseTarget.Parent:FindFirstChild("Humanoid") then print("Yes4") --Doesn't get printed local TargetPlayer = game.Players:GetPlayerFromCharacter(MouseTarget.Parent) if TargetPlayer ~= game.Players:GetPlayerFromCharacter(Character) then print("Yes5") --Doesn't get printed local TargetPlayerBackpack = TargetPlayer.Backpack ItemGive:FireServer(TargetPlayerBackpack, Tool) print("Success!") --Doesn't get printed end end end end end) --ServerScript: local ReplicatedStorage = game:GetService("ReplicatedStorage") local ItemGive = ReplicatedStorage:FindFirstChild("ItemGive") local ToolToGetCloned = ReplicatedStorage:FindFirstChild("Tool") ItemGive.OnServerEvent:Connect(function(plr, TargetPlayerBackpack) local ToolClone = ToolToGetCloned:Clone() ToolClone.Parent = TargetPlayerBackpack end)
make
MouseTarget.Parent:FindFirstChild("Humanoid")
this
MouseTarget.Parent:FindFirstChildOfClass("Humanoid")or MouseTarget.Parent.Parent:FindFirstChildOfClass("Humanoid")
and have it print out the target