Attempt to perform arithmetic (sub) on string and Vector3

hello,
I need help with my revive system (the issue is stated in the title), i tried searching the solution in DevForum, but couldn’t find one.

how it works is simple, hold R nearby a downed player.
help will be appreciated!

--// Local Script
local HRPCFrame = character:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 0, 0).Position

uis.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end

	if input.KeyCode == Enum.KeyCode.R and not debounce and canRevive and character:FindFirstChild("HumanoidRootPart") then
		reviveRemote:FireServer(HRPCFrame, "Start")
		print("yes")
		debounce = true

	elseif not character:FindFirstChild("HumanoidRootPart") then print("no")
	end
end)

--// Server Script
reviveRemote.OnServerEvent:Connect(function(plr, hrp, request)
	local region3 = Region3.new(hrp - CFrame.new(2, 2, 2).Position, hrp + CFrame.new(2, 2, 2).Position) --// The Error
	local region= workspace:FindPartsInRegion3(region,nil,20)

try this:

--// Local Script
local HRPCFrame = CFrame.new(character:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 0, 0).Position)

uis.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end

	if input.KeyCode == Enum.KeyCode.R and not debounce and canRevive and character:FindFirstChild("HumanoidRootPart") then
		reviveRemote:FireServer(HRPCFrame, "Start")
		print("yes")
		debounce = true

	elseif not character:FindFirstChild("HumanoidRootPart") then print("no")
	end
end)

and why do you have ‘region’ and not ‘region3’ in ‘FindPartsInRegion3’ in server script?

it still doesn’t work, but there’s a new error in the output:
“invalid argument #1 to ‘new’ (Vector3 expected, got CFrame)”

and oh, I didn’t realize that! I fixed it but doesn’t solve the issue

hrp in this case is a CFrame and needs to be a Vector.

still doesn’t work sadly, the output switches to the title’s

I think the issue here is that the math operations you’re doing are confusing the functions. As such, I would do this:

Region3.new((hrp.Position - Vector3.new(2,2,2), hrp.Position + Vector3.new(2,2,2))

I believe you’re missing a parenthesis (gives a red line), but I did this:

Region3.new((hrp - Vector3.new(2,2,2)), (hrp + Vector3.new(2,2,2)))

also, the “hrp” isn’t exactly a HumanoidRootPart, it’s a Vector3 value (fired from client to server):

local HRPCFrame = Vector3.new(character:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 0, 0).Position)

nonetheless it’s still not working

I fixed this, I forgot to put HRPCFrame in InputEnded line