i am making a streetlight that when you click on it with a wrench the light part gets destroyed but when i tested the game you couldn't touch click detectors with it is there any way i could make it possible
here is the script for the click detector
local clickdetecter = script.Parent:WaitForChild("ClickDetector")
local Team = game:GetService("Teams"):WaitForChild("Construction")
local function onMouseClick(player)
print('player who clicked is ' .. player.Name)
if script.Parent.broken.Value == true then
if player.Team == Team then
print("player is on construction")
else
print("player is not on construction")
end
else
print("light is not broken")
end
end
clickdetecter.MouseClick:Connect(onMouseClick)

2 comments
Please local the tool at where the Wrench is located at.
i tried it it does not work