I'm trying to make a script where if you equip a tool, you can click on someone and their name will show, but it does it even when the tool isn't equipped
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local plr = Players.LocalPlayer
local tool = script.Parent
local mouse = plr:GetMouse()
local debounce = true
if not tool.Equipped then return end
mouse.Button1Down:Connect(function()
local target = mouse.Target
if debounce then
debounce = false
if target.Parent:FindFirstChild("Humanoid") and target.Parent ~= game.Workspace then
print(target.Parent.Name)
end
debounce = true
end
end)
** You are now Level 12! **