Why doesn't a part trigger Touched?

Hello There,

It’s been a while wasn’t it?
Now i have a weird problem.

so i want to make a puzzle where the player has to push a cube in the correct area,
that area has an invisible part to check whether or not the cube has been in the area.

so i used .Touched to check if the cube touched the area, but when i make the script print whatever touches the part, it only prints player limbs, but never the actual part.
why is that?

reference picture:


and this is the script which checks for the part that is called ‘ConnectorBrick’:

local Part = script.Parent
local Cable = script.Parent.Parent.Cable1
local Cable2 = script.Parent.Parent.Cable2

Part.Touched:Connect(function(hit)
	print(hit)
	if hit ~= workspace.ConnectorBrick then return end
	Part.CanTouch = false
	Part.Parent:SetAttribute("SignalON",true)	
	workspace.ConnectorBrick.Material = Enum.Material.Plastic
	workspace.ConnectorBrick.BrickColor = BrickColor.new("Grey")
	Cable2.Red.BrickColor = BrickColor.new("Bright blue")
	Cable.Red.BrickColor = BrickColor.new("Bright blue")
	Cable2.Red.Material = Enum.Material.Neon
	Cable.Red.Material = Enum.Material.Neon
end)

so let me explain, the cable need to turn blue and neon to just visualize that they are powered now because the brick touched the part in the middle, the SignalON attribute is used to tell whatever other thing uses this connection, to activate their stuff, so if the exit door uses the signal, whenever it is on it opens the door pretty much.

Thanks in advance!!!

Did you turn off CanTouch for the other part? Otherwise I don’t really know the problem, maybe tge names don’t match?

Cantouch and CanCollide are on for the connector brick, but for the area brick only Cantouch is on and cancollide is false (to make it like an invisible trigger)

I don’t really know the problem, it all seems fine, try putting this in the connector brick

1 Like

it works now, thank you!!!
i still have to figure out why the first one didn’t work

Might be a dumb take but maybe because it was touching a lot of other things?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.