--[[
    Returns true the vector3 is within x and z bounds of an axis aligned part
]]

local function isVector3InBoundsOfPart(vector3, part)
	local worldSize = part.CFrame:vectorToWorldSpace(part.Size)
	worldSize = Vector3.new(math.abs(worldSize.X), math.abs(worldSize.Y), math.abs(worldSize.Z))

	local minX, maxX = part.Position.X - (worldSize.X / 2), part.Position.X + (worldSize.X / 2)
	local minZ, maxZ = part.Position.Z - (worldSize.Z / 2), part.Position.Z + (worldSize.Z / 2)

	return vector3.X >= minX and vector3.X <= maxX and vector3.Z >= minZ and vector3.Z <= maxZ
end
