Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My ItemGiver script doesn't work. It doesn't print Yes4 and Yes5?

Asked by 4 years ago
01--Local Script:
02local player = game.Players.LocalPlayer
03local Tool = script.Parent
04local mouse = player:GetMouse()
05local Character = player.CharacterAdded:Wait()
06local ReplicatedStorage = game:GetService("ReplicatedStorage")
07local ItemGive = ReplicatedStorage:FindFirstChild("ItemGive")
08local isEquipped = false
09 
10Tool.Equipped:Connect(function()
11    isEquipped = true
12end)
13 
14Tool.Unequipped:Connect(function()
15    isEquipped = false
View all 68 lines...
0
that means that you have to activate the tool at a character, I think marine5575 359 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

make

1MouseTarget.Parent:FindFirstChild("Humanoid")

this

1MouseTarget.Parent:FindFirstChildOfClass("Humanoid")or MouseTarget.Parent.Parent:FindFirstChildOfClass("Humanoid")

and have it print out the target

0
FindFirstChildWhichIsA has a recursive boolean. Shouldn't you stick with MouseTarget.Parent.Parent and that function? Fifkee 2017 — 4y
Ad

Answer this question