--Casts the mouse's position to 3D space.

local function Get3DPosition(X,Y)
	local MouseRay = Camera:ScreenPointToRay(X,Y,1000)
	local EndPos = MouseRay.Origin + MouseRay.Direction
	return CastRay(Camera.CFrame.p,(EndPos - Camera.CFrame.p).unit,1000)
end
