Which of these is correct?

local function mouseButton1Down()
	centerOriginalCFrame = CenterPartWithArrows.ExtentsCFrame
	for part, selection in boxes do
		originalPartCFrames[part] = part.CFrame
	end
end

rotatetool.MouseButton1Down:Connect(function()
	mouseButton1Down()
end)

or

rotatetool.MouseButton1Down:Connect(mouseButton1Down())

or

rotatetool.MouseButton1Down:Connect(mouseButton1Down)

Thanks!

1 Like

You might as well use the last one, the function you want to connect seems to have no parameters, it would be wasteful to connect a function to call the function.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.