Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is touch interest constant?

Asked by
Kitorari 266 Moderation Voter
7 years ago
workspace.ThePinFamily.Pin1.Touched:connect(function(Test)

    local Scanner = Test.Parent:findFirstChild("Scanner")
    if Scanner then
        workspace.PartScoreboard.SurfaceGui.Frame.pin1.BackgroundColor3 = Color3.new(0, 1, 0)
    end 

end)

workspace.Part.TouchEnded:connect(function(Scanner)
    workspace.PartScoreboard.SurfaceGui.Frame.pin1.BackgroundColor3 = Color3.new(1, 0, 0)
end)

This is what I have written, now is touch interest constant or a block has to move inorder to consider it touching?

Because only when I re-spawn the pins does it flash green, which means it's touching, and red when its not, which it tends to stay red alot.

If its true the block has to be moving, does anyone know a script that'll make a scanner constantly move up and down? I suppose like a elevator?

1 answer

Log in to vote
0
Answered by 7 years ago

The connecting brick needs to trigger the .Touched event. If they are instanced ontop of each other, they won't trigger .Touched until either of them actually moves. That's correct.

Same goes for if you're trying to move something with CFrame - the .Touched event will not be called despite the bricks connecting.

0
Welp. I've got a problemo then, thank you clarifying that. might try elevator like scanners instead. Kitorari 266 — 7y
Ad

Answer this question