How to get the mouse when developing a plugin

So basically, I want to have a part following the mouse of the person that is using my plugin, I am perfectly capable of doing this, but for some reason, I cannot get the mouse position?

game:GetService("UserInputService").InputBegan:Connect(function(input)
	print('input')
	if input.UserInputType == Enum.UserInputType.MouseMovement then
		if PluginActive then
			print('Ready to move')
			if CurrentlySelected == nil then
			else
				print('move')
				CurrentlySelected.CFrame = CFrame.new(Vector3.new(input.Position.X, input.Position.Y, input.Position.Z) + Vector3.new(0,0,0))
			end	
		end
	end
end)

LINK
If you know how I would place a block at the mouse position, that would be amazing.

Try:

game:GetService("UserInputService").InputBegan:Connect(function(input)
	print('input')
	if input.UserInputType == Enum.UserInputType.MouseMovement then
		if PluginActive then
			print('Ready to move')
			if CurrentlySelected == nil then
				break
			else
				print('move')
				CurrentlySelected.CFrame = input.Position
			end	
		end
	end
end)

to place a block, just put object at input.position also

I think input.Position is the position of the mouse on the screen, not in the workspace.
Try using local mouse = plugin:GetMouse() and mouse.Hit.X;mouse.Hit.Y;mouse.Hit.Z