This Mouse is not active

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!
    To get rid of this error
  2. What is the issue? Include screenshots/videos if possible!
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
		if plr.PlayerGui:FindFirstChild("InfoGui") and plr:GetMouse() and mouse and mouse.X and equipped then -- this is the line giving the error
			plr.PlayerGui.InfoGui.CrossHair.Position = UDim2.new(0,mouse.X,0,mouse.Y)
			if locked == true then
				local crosshair = plr.PlayerGui.InfoGui.CrossHair
				crosshair.Box.Line1:TweenPosition(UDim2.new(.5,-1,0,30), "In", "Quad", .1, false)
				crosshair.Box.Line2:TweenPosition(UDim2.new(.5,-1,0,30), "In", "Quad", .1, false)
				crosshair.Box.Line3:TweenPosition(UDim2.new(1,-40,.5,-1), "In", "Quad", .1, false)
				crosshair.Box.Line4:TweenPosition(UDim2.new(0,30,.5,-1), "In", "Quad", .1, false)
				unlock = true
			elseif unlock == true and locked == false and chair.crosshairtype[1] == "gui" then

				delay(.1, function()
					local crosshair = plr.PlayerGui.InfoGui.CrossHair
				crosshair.Box.Line1:TweenPosition((o1 + UDim2.new(UDim2.new(0,0,0,offsetsize))), "Out", "Quad", .1, false)
				crosshair.Box.Line2:TweenPosition((o2 - UDim2.new(UDim2.new(0,0,0,offsetsize))), "Out", "Quad", .1, false)
				crosshair.Box.Line3:TweenPosition((o3 + UDim2.new(UDim2.new(0,offsetsize,0,0))), "Out", "Quad", .1, false)
				crosshair.Box.Line4:TweenPosition((o4 - UDim2.new(UDim2.new(0,offsetsize,0,0))), "Out", "Quad", .1, false)
				unlock = false
				end)
				
			end
		end
	end))