I need to check if a player is in a zone, but when i come into the brick, nothing is appearing in the console.
b = true
script.Parent.Touched:Connect(function(hit)
print("you touched me :(")
if game.Workspace.Temp.Errored.Value and b then
p = 1
b = false
local a = hit.Parent:FindFirstChild("Humanoid")
if a ~= nil and p == 1 then
wait(5)
game.Workspace.Pipes.Pipe1.Transparency = 1
game.Workspace.Pipes.Pipe2.Transparency = 1
game.Workspace.Pipes.Pipe3.Transparency = 1
game.Workspace.Pipe1.Transparency = 0
game.Workspace.Temp.Errored.Value = 0
game.Workspace.Temp.Errored2.Value = 0
wait(10)
b = true
end
end
end)
script.Parent.TouchEnded:Connect(function()
print("you stopped touching me :)")
p = 0
end)
It does detect touches from other parts, though. In here it says that invisible detection is a thing. EDIT: After some time this problem disappeared, weird

5 comments
Why are you checking if Temp.Errored.Value equals true?
Boolvalue.
But on line 14, OP assigns Errored.Value to zero.
Other stuff in the game makes Errored.Value true, "you touched me" is not appearing when I get in the brick
Okay, after some time it started working. Not sure what was wrong though.