Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is touch interest constant?

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

✓ Accepted answer

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.

1 comment

0

Welp. I've got a problemo then, thank you clarifying that. might try elevator like scanners instead.

This discussion is preserved as it was. New answers, comments, and votes are closed.