Aight so, i have 4 parts, every part has inside a Click detector
Those 4 ClickDetectors parts are created by a for i,v in iparis() script so i can create how much i need
Also i’ve added a check to player backpack with a tool ("tool)
The problem is that when clicking and using the ClickDetector.MouseClick:Connect(Function)
I don’t have any output
BloodPart = script.Parent.Parent
BloodTypes = require(game.ServerScriptService.Blood)
Blood = {BloodPart.Blood1,BloodPart.Blood2,BloodPart.Blood3,BloodPart.Blood4}
player = game:GetService("Players")
for i,v in ipairs(Blood) do
CDec = Instance.new("ClickDetector")
CDec.Parent = v.Parent
CDec.MaxActivationDistance = 10
wait()
end
CDec.MouseClick:Connect(function(player)
print("Clicked")
local tool = player.Backpack:FindFirstChild("BloodTaker")
print("Clicked2")
end)