I Have Been Working On A Project And I Cant Find How I Would Be Able To Create a System Where A player can give another player a tool
You can simply switch the Parent of the tool like this
1 | local Tool = script.Parent |
2 | Tool.Parent = -- Refer to the other player here |
Here is an example using that line
01 | local Player = game.Players.LocalPlayer |
02 | local Tool = script.Parent |
03 | local Mouse = Player:GetMouse() |
04 |
05 | Mouse.Button 1 Down:Connect( function () |
06 | local Target = Mouse.Target |
07 |
08 | if Target:IsA( "BasePart" ) and Target.Parent.Humanoid then |
09 | Tool.Parent = Target |
10 | end |
11 | end ) |
Take the tool and parent it to the other player.
Whenever a player has a tool equipped, it's found in their Character, which is how I tell what tool a player is currently using.
1 | local tool = player 1. Character.(the tool's name) |
2 | tool.Parent = player 2. Character |