Need help with VeiwportPointToRay

Hello, I have been messing around with the ViewportPointToRay method as part of an alternative solution to mouse.hit. However, as you can see from the video below, there is an offset to direction in relation to the mouse cursor. Any help would be appreciated:

Code snippet:

local function throwSnowball(userInput) -- Userinput object from InputBegan
	-- First we need to calculate the direction the player hit:
	local inputPosition = userInput.Position
	local positionRay = CurrentCamera:ViewportPointToRay(inputPosition.x, inputPosition.y)
	local rayDirection = positionRay.Direction
	local p ="Part",workspace)
	p.Position = rayDirection * 100

Your script is not respecting positionRay.Origin.
Try p.Position = positionRay.Origin + rayDirection * 100

OP wants to transform the screen position to a world position, which is done using the ray.