What I would like to know is how would I be able to get a player's humanoid and store into a variable when the player has activated a tool in their starter pack such as: shooting a gun, lunging a sword, dropping a bomb.
This is a broad topic, so I will give you an example.
SETUP
1) Create a server script under server script service
2) Create a bindable event under replicated storage
-Name it "ToolActivated"
3) Create a script under each tool you want to detect the activation on
SCRIPTING
Step 1 server script:
ev = game:GetService("ReplicatedStorage"):WaitForChild("ToolActivated") playersActivated = {} ev.Event:Connect(function(plrName) local InTable = false for _,v in pairs(playersActivated) do if v == plrName then InTable = true end end if InTable == true then return end table.Insert(playersActivated,plrName) end) while wait(10) do --This just prints who has activated a tool every 10 seconds local PLRstring = "" for i,v in pairs(playersActivated) do if i == #playersActivated then PLRstring = PLRstring..v else PLRstring = PLRstring..v..", " end end print("The following players have activated a tool: "..PLRstring end
Step 3 EACH server script:
EV = game:GetService("RepliactedStorage"):WaitForChild("ToolActivated") tool = script.Parent tool.Activated:Connect(function() EV:Fire(tool.Parent.Name) end)
I hope my answer helped! ~mc3334