01 | --Local Script: |
02 | local player = game.Players.LocalPlayer |
03 | local Tool = script.Parent |
04 | local mouse = player:GetMouse() |
05 | local Character = player.CharacterAdded:Wait() |
06 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
07 | local ItemGive = ReplicatedStorage:FindFirstChild( "ItemGive" ) |
08 | local isEquipped = false |
09 |
10 | Tool.Equipped:Connect( function () |
11 | isEquipped = true |
12 | end ) |
13 |
14 | Tool.Unequipped:Connect( function () |
15 | isEquipped = false |
make
1 | MouseTarget.Parent:FindFirstChild( "Humanoid" ) |
this
1 | MouseTarget.Parent:FindFirstChildOfClass( "Humanoid" ) or MouseTarget.Parent.Parent:FindFirstChildOfClass( "Humanoid" ) |
and have it print out the target