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!!!