Contextaction overrides my ClickDetector

So basically, im making a block placing system and I bind MouseButton1 to a place function. Before the function even fires, ClickDetectors work perfectly fine. But when it fires, they all just break and don’t work. I searched aorund and returning Enum.ContextActionResult.Pass was the solution for most but it didn’t really do anything for me.

Can anyone help?

local function placeBlock(_name, inputState, _inputObj)
	if inputState == Enum.UserInputState.Begin then
		if prev and equipConn then
			if tool and tool:GetAttribute("Amount") > 0 then
				placeBlockRE:FireServer(tool:GetAttribute("BlockID"), prev.Position)
			end
		end
	end
	
	return Enum.ContextActionResult.Pass
end

contextActionService:BindAction("Place", placeBlock, false, Enum.UserInputType.MouseButton1, Enum.UserInputType.Touch)

why would you want to active clickdetectors when you are trying to place blocks? shouldn’t they only work when you aren’t in place mode?

1 Like

The ClickDetectors are for something else (when you place a block, you can clikc that block to destroy it)

Don’t use clickdetectors for that, it’ll end up lagging the game. Just do the same thing with your placing logic but instead of going on top of a block face have it target the block for deletion instead, and make it a toggleable mode or something