- What do you want to achieve?
So, I want to make a script that whenever a player equips a tool (No matter what tool it is) it will find which tool and it will print the name and also the player who equipped it.
- What is the issue?
I am not sure how I would do it, I thought of using a for loop to go through the Character, but that doesn’t do it as it doesn’t have an event that I am aware of using yet, so nothing actually happens with the for loop.
- What solutions have you tried so far?
Yes, I have tried looking on ScriptingHelpers and also on the forum, however, I can’t seem to find anything with my answer. This is the for loop that I have used yet nothing happens as it isn’t accompanied by an event.
local character = game.Players.LocalPlayer.Character
for i,v in pairs(character:GetChildren()) do
if v:IsA("Tool") then
print(v.Name)
end
end
Be sure to ask any questions if my topic doesn’t make any sense, I will be active on here for a while.