Which of these is more efficient?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    A smooth painting system inside of GUI

  2. What is the issue? Include screenshots / videos if possible!
    Whenever I move my mouse to fast it doesn’t place smoothly:
    https://gyazo.com/729d2248682710049178d3c660d83f46

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Well that’s the issue! I am not sure which would be better. Currently, I detect when the user mouse1goes down and sets isPressed to true and if it gets let go then false and I detect for when the user’s mouse moves (and yes in the future I will make it so when the user first starts to click it will place without needing to move your mouse). Here is what I have currently.

InputService.InputChanged:Connect(function(input, engine_processed)
	if engine_processed then
		return
	end

	if input.UserInputType == Enum.UserInputType.MouseMovement then
		print("Mouse movement!")
		if isPressed == true then
			print("Is being pressed.")
			local x = mouse.X
			local y = mouse.Y
			

			-- TEST 2 WITH UI CORNERS --
			local image = Instance.new("Frame")
			image.Size = UDim2.new(0, 10, 0, 10)
			image.Parent = UI
			local UICorner = Instance.new("UICorner")
			UICorner.CornerRadius = UDim.new(1, 0)
			UICorner.Parent = image
			
			image.Position = UDim2.new(0, x - UI.AbsolutePosition.X, 0, y - UI.AbsolutePosition.Y)
		end
	end
end)

but, what about if I instead do all this when the user is holding down the mouse button and just check if there is a frame that is the same color there already? Using mouse.Button1Down?

I hope this made sense, thanks in advance, have a nice day/night c:

You could try
https://developer.roblox.com/en-us/api-reference/event/Mouse/Move

I did, it didn’t seem to work very well… but what I have now is basically the same so should I detect for down button click then place a bunch if there isn’t a frame there already? or should I just detect movement?

I believe using an event for detecting when the mouse moves is not the best tactic, you can use a while loop and check for a mouse target instead. link